zblz / naima

Derivation of non-thermal particle distributions through MCMC spectral fitting
http://naima.readthedocs.io
BSD 3-Clause "New" or "Revised" License
45 stars 54 forks source link

Use of - instead of ~ on boolean (uls) #160

Closed mireianievas closed 7 years ago

mireianievas commented 7 years ago

Hi,

Is there any reason why variables such as notul are obtained with the - operator instead of ~ on booleans (data['ul'] for instance). I have identified several places in the code where it is done this way.

I'm using Python 2.7.13 (numpy 1.13) and this makes naima crash or give weird results when plotting the data. I am not sure if this is something happening with recent python versions or if this was introduced in purpose for compatibility (Python 3?)

Cheers Mireia

mireianievas commented 7 years ago

Ok, silly me. I think this was already fixed (June 25 commit) in github (but not in the release available with pip)

zblz commented 7 years ago

Yep, fixed in master but not released. Will make a release soon even if it's only to include this.

zblz commented 7 years ago

@mireianievas - thanks for reporting it anyway!