specutils icon indicating copy to clipboard operation
specutils copied to clipboard

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

Open jortiz12 opened this issue 2 years ago • 1 comments

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

jortiz12 avatar Feb 10 '23 10:02 jortiz12

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

pllim avatar Feb 13 '23 22:02 pllim