Closed ThomasHerard closed 1 year ago
Hi Thomas,
I'm not convinced this is related to any specific values of y_scale. I've had this kind of error before when the spectrum that's been provided to the code contains significantly higher flux values than the associated photometry. Might this be what's going on in your case? As I often tell people, I see the plotting functions as kind of an add-on to the code rather than core functionality. If they work, great, but I can't guarantee they will in all situations. I'd always encourage people to make their own plots to check their outputs.
Cheers, Adam
It does depend on the y_scale
value but seems system dependant as explained here on stackoverflow, I have had the switch to object type at 10^20 or 10^(-20) on two machines, which for latter can be inconvenient as those fluxes scales are common.
However, I understand your policy on the plotting functions and have not opened a pull request, thanks for the reply anyway!
Cheers, Thomas
Ah ok that's interesting, thanks. Feel free to open a pull request to fix this if you'd like, no pressure though.
I believe this should now be fixed in v1.0.2
I encountered this issue when plotting spectra with small fluxes in the order of 10**(-20). Once
y_scale <= -20
, the arrays'dtype
becomesobject
and the following error is raised:Quick fix would be to cast
y_scale
to float before plotting, I will open a pull request where I found the issue but it might be found elsewhere as well.