astropy / specutils

An Astropy coordinated package for astronomical spectroscopy. Maintainers: @rosteen @keflavich @eteq
http://specutils.readthedocs.io/en/latest/
167 stars 127 forks source link

Error Spectrum1D object creation (ufunc 'isnan' not supported for the input types) #1007

Open jortiz12 opened 1 year ago

jortiz12 commented 1 year ago

Dear Community, I'm trying to create a Spectrum1D object from a MUSE datacube (after suming over the two spatial dimensions) through lamb = lambdas
flux = sp1
spec = Spectrum1D(spectral_axis=lamb, flux=flux)

However, I´me getting this error, when I've checked that sp1 (sp1 = cube.sum(axis=(1,2))) is a numpy array with no NaNs.

TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

Kind Rgds Jose

pllim commented 1 year ago

Hello. You would have to provide a minimally reproducible code (plus data) so devs can try to investigate. Thanks!