Error in Ex. 4 for Dinosaur assignment

Hi,

When building the model I keep having the below error when I try to convert list of characters to list of integers using list comprehension.

IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

Does this error gives a clue?

Thanks,
Abdulrahman

Hi @adarwish ,

print statement is very helpful for debugging. You can check the value of the following to see if it is as expected:

idx
single_example_chars
single_example_ix

1 Like

Thanks Kic, sorted out.