mzechmeister / serval

calculate radial velocities from stellar spectra
MIT License
36 stars 9 forks source link

TypeError: slice indices must be integers or None or have an __index__ method #43

Closed mzechmeister closed 2 years ago

mzechmeister commented 2 years ago

The follow error occurs with Python 3 for CARM_NIR

  File "serval/src/inst_CARM_NIR.py", line 169, in data
    f = f[sl]
TypeError: slice indices must be integers or None or have an __index__ method

https://github.com/mzechmeister/serval/blob/2a9437f6d9073291b64c5569ea9f121f13f06db7/src/inst_CARM_NIR.py#L165-L169

Inspection with -pdb yields

-> f = f[sl]
(Pdb) sl
slice(None, 2040.0, None)

Thus, Python 3 is too strict with float.