Closed sndik16 closed 1 year ago
I got the following line of code, as in the documentation
m1 = cube.moment(order=1)
It raised the following warning.
/Users/mariastone/opt/anaconda3/lib/python3.8/site-packages/spectral_cube/_moments.py:168: RuntimeWarning: invalid value encountered in true_divide return (np.nansum(data * pix_cen, axis=axis) /
My cube is masked, so that the masked pixels have the value of NAN.
Just letting you know about this. Best regards, Maria
Thanks for the note! You'll get this warning when a spectrum is fully masked and the divide encounters a NaN/NaN.
NaN/NaN
I got the following line of code, as in the documentation
It raised the following warning.
/Users/mariastone/opt/anaconda3/lib/python3.8/site-packages/spectral_cube/_moments.py:168: RuntimeWarning: invalid value encountered in true_divide return (np.nansum(data * pix_cen, axis=axis) /
My cube is masked, so that the masked pixels have the value of NAN.
Just letting you know about this. Best regards, Maria