You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with open(csv_nm, mode='rb') as file:
spectra, spectra_metadata = prisma.parsers.single_csv(file.read())
`
It gave me this error
`---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
in
2
3 with open(csv_nm, mode='rb') as file:
----> 4 spectra, spectra_metadata = prisma.parsers.single_csv(file.read())
5
6 # pd.read_csv(csv_nm)
./PRISMA/prisma/parsers.py in single_csv(bitstream)
76 spectra_data = np.array([np.array(line.split(sep=b','), dtype=float) for line in read_lines[1:] if line.split(sep=b',')[0] != b''])
77
---> 78 indexes = spectra_data.T[0]
79
80
IndexError: index 0 is out of bounds for axis 0 with size 0
`
I used pandas to check that the file was ok and it seemed to be fine. I think there is some compatibility issue.
Thanks,
Jack
The text was updated successfully, but these errors were encountered:
I tried running the following code
`csv_nm ='./PRISMA/docs/data_single_csv/synthetic_dataset.csv'
with open(csv_nm, mode='rb') as file:
spectra, spectra_metadata = prisma.parsers.single_csv(file.read())
`
It gave me this error
`---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
in
2
3 with open(csv_nm, mode='rb') as file:
----> 4 spectra, spectra_metadata = prisma.parsers.single_csv(file.read())
5
6 # pd.read_csv(csv_nm)
./PRISMA/prisma/parsers.py in single_csv(bitstream)
76 spectra_data = np.array([np.array(line.split(sep=b','), dtype=float) for line in read_lines[1:] if line.split(sep=b',')[0] != b''])
77
---> 78 indexes = spectra_data.T[0]
79
80
IndexError: index 0 is out of bounds for axis 0 with size 0
`
I used pandas to check that the file was ok and it seemed to be fine. I think there is some compatibility issue.
Thanks,
Jack
The text was updated successfully, but these errors were encountered: