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

I am finding difficulty in spotting the error in my code. Any help would be appreciated.

Do not put single_example_ix inside quotes or square brackets. It is already a string array.

1 Like

but still i am facing the same error

“single_example_chars = …” should use single_example, not examples[idx].

1 Like

Thank you. Issue resolved