IndexError: too many indices for array
I think the problem is given in the error message, although it is not very easy to spot: ‘Too many indices’ means you’ve given too many index values. You’ve given 2 values as you’re expecting data to be a 2D array. Numpy is complaining because data is not 2D (it’s either 1D or None). This is a … Read more