DLP Course 5 Week 1 Excercise 2 Last cell

Hi.

I am stuck at the final graded cell.

With the error code:
Code Cell UNQ_C4: Unexpected error (IndexError(‘only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices’)) occurred during function check. We expected function model to return Test 4 failed. Please check that this function is defined properly.

~/work/W1A2/utils.py in rnn_forward(X, Y, a0, parameters, vocab_size)
100
101 # Update the loss by substracting the cross-entropy term of this time-step from it.
→ 102 loss -= np.log(y_hat[t][Y[t],0])
103
104 cache = (y_hat, a, x)

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

Hints for debugging would be highly welcome.

Perhaps you had an issue with the use of square brackets.