Closed anawas closed 1 year ago
I assume the problem is caused because the mask in the masked_array used is all False:
print(spec.data.sum())
Output: nan
print(spec.data)
Output:
masked_array(
data=[[124.0, 122.0, 122.0, ..., 122.0, 122.0, 123.0],
[121.0, 122.0, 121.0, ..., 121.0, 122.0, 121.0],
[123.0, 122.0, 123.0, ..., 123.0, 122.0, 122.0],
...,
[146.0, 147.0, 147.0, ..., 146.0, 146.0, 145.0],
[nan, nan, nan, ..., nan, nan, nan],
[nan, nan, nan, ..., nan, nan, nan]],
mask=[[False, False, False, ..., False, False, False],
[False, False, False, ..., False, False, False],
[False, False, False, ..., False, False, False],
...,
[False, False, False, ..., False, False, False],
[False, False, False, ..., False, False, False],
[False, False, False, ..., False, False, False]],
fill_value=1e+20)
A cannot reproduce this bug after merging the latest commit.
Sometimes, the mean value of spectrogram data is reported as Nan. In the following case, e.g:
Why does it matter? I use the mean value in order to adjust the colormap when plotting the spectrogram.