C5 W1 A3 Jazz improvisation Exercise 3

I have an issue with ex 3 of the Jazz improvisation assignment . In step 2 the pred variable it is a list of arrays, and within each array I need to find the index of the max value, but with np.argmax does not work with horizontal arrays just like pred variable, I’ve tried to use a for to run the list and extract each index, but does not work. Any clue which way to go?

In step 1 you compute “pred = …” using the inference_model.predict(…) method.

In step 2 you compute 'indices = …" using np.argmax() on “pred” with axis = -1.