-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variables became numpy masked arrays #849
Comments
See discussion on #785. You can restore the old behaviour by setting set_always_mask |
Hi @akrherz Thanks a lot for pointing out the discussion and a solution. It is okay for me to get the masked array as default, but is it reasonable to make the size of mask same as that of array, instead of just returning a scalar mask for a masked array though there is no any masked value? |
The use of a scalar value of |
Hi @dopplershift Thanks a lot. Yes. In our codes, if an array (A) is a masked array, we will do some calculations based on the values of the A.mask and also assume that the size of A.mask is same as A. The returning scalar "False" will break the codes. |
I don't think you can assume that |
Thanks. I saw your point. I think I should close this issue now. |
I have noticed that variables in a nc file became a numpy masked arrays though there were no any masked values in variables. For example:
$ ncdump -v lon lon_bnds.nc |more
$ python
The size of mask of the masked array is only 1, not the same size of the array itself. The early version of netCDF4 treated it as a normal numpy array.
The text was updated successfully, but these errors were encountered: