Closed cuong450 closed 6 years ago
The proximal cause of the error is, as the message says, a float is being passed to the data
numpy array as an index, likely r
, which is calculated a few lines above. Unfortunately, however, I am not able to replicate this error myself.
importLPFDemo
in any way that might have caused this? Type errors like this should be caught by the plotLPFData
function, but that could explain why I'm not seeing the error.Note that this appears to only be a problem in the plotting function plotLPFData
. If you do not need this functionality, and are just interested in parsing the LPF file into an array, you can move on until we find a solution.
Issue RESOLVED when I switched to 2.7.14, originally I was running with Python 3.x
Printed Error: /Desktop/Iris-master/Python/LPFParser.py", line 207, in plotLPFData plt.step(data[0]/1000./60., data[1][:,r,c,chi], lw=mplargs['lw'], alpha=mplargs['alpha'],
IndexError: only integers, slices (
:
), ellipsis (...
), numpy.newaxis (None
) and integer or boolean arrays are valid indices<matplotlib.figure.Figure at 0x1820ea4f28>
Hi, Do you have any suggestions on why this would occur? Thank you.