How to fix numpy.AxisError: axis X is out of bounds for array of dimension Y in Python | DevErrors