taborlab / Iris

The Light Program Interface
BSD 3-Clause "New" or "Revised" License
12 stars 2 forks source link

error while following importLPFDemo steps #306

Closed cuong450 closed 6 years ago

cuong450 commented 6 years ago

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.

SynbioLucas commented 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.

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.

cuong450 commented 6 years ago

Issue RESOLVED when I switched to 2.7.14, originally I was running with Python 3.x