specutils
specutils copied to clipboard
Error Spectrum1D object creation (ufunc 'isnan' not supported for the input types)
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
Hello. You would have to provide a minimally reproducible code (plus data) so devs can try to investigate. Thanks!