C3W4: UNQ_C1 data generator

I’m passing 6/8 tests but the last two seem to be processing the wrong sentences and I’m not sure why.
When I run my data generator through the tests I seem to be getting the correct padding but am simply processing a different set of sentences. Here’s an example:

Expected [[ 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1]
[30 55 56 57 58 59 60 21 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1]
[30 61 6 62 63 64 65 66 67 68 69 70 71 72 73 74 75 21 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1]
[32 33 4 34 6 35 36 21 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1]
[86 87 88 89 90 91 92 93 17 87 94 95 72 96 21 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1]].
Got [[ 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1]
[32 33 4 34 6 35 36 21 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1]
[32 38 4 41 11 42 43 44 45 21 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1]
[30 33 49 50 51 39 52 21 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1]
[30 55 56 57 58 59 60 21 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1]].

Hi @MP12

Unit tests test for different aspects of your implementation. Your code failed on two of the 8.
From the printout it looks like you got the padding aspect right. Also the first outputs looks identical.
So one probable cause for failing tests is indexing (how you calculate and use idx value).
Another probable cause for this if you do not use shuffle parameter to shuffle the questions.

Cheers