jobovy / apogee

Tools for dealing with APOGEE data
BSD 3-Clause "New" or "Revised" License
42 stars 25 forks source link

numpy error lsf.py #51

Closed jbirky closed 6 years ago

jbirky commented 6 years ago

Hi Jo, I noticed a bug in line 184 of lsf.py where the line gd= True-numpy.isnan(pix) returned the error

TypeError: numpy boolean subtract, the - operator, is deprecated, use the bitwise_xor, the ^ operator, or the logical_xor function instead.

I fixed this in my version of the code by changing the line to gd= numpy.bitwise_xor(True, numpy.isnan(pix))

jobovy commented 6 years ago

Thanks for reporting this. Yes, this is a known issue with the - operator being deprecated, but I hadn't fixed all instances yet. Should be fixed now.