-
Notifications
You must be signed in to change notification settings - Fork 264
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
Behavior of set_fill_off() changed in v1.5.1 #972
Comments
jswhit
added a commit
that referenced
this issue
Sep 19, 2019
I see the problem - a simple case of have and |
jswhit
added a commit
that referenced
this issue
Sep 21, 2019
fix for issue #972 (masked array not returned when auto_fill off)
Closed by #973. Thanks for the report. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
netCDF4-1.5.1 (installed via pip 19.1.1)
Python 3.6.2 (virtualenv)
macOS Sierra (10.12.6)
Based on the documentation, my understanding of
Dataset.set_fill_off()
is that it leaves variables uninitialized upon creation. This is useful in cases were the variable is immediately filled with real data. With earlier versions of netCDF4, this works as expected:As of v1.5.1, the final assertion fails. Inspection of the netCDF file using
ncdump
shows thatvar1
is set to_FillValue
as expected. However, whenvar1
is read from the file, it is not masked anywhere. The value is_FillValue
(9.9692e+36) everywhere, but the mask of the resultingMaskedArray
isFalse
.Somehow, calling
set_fill_off()
when the variable is created is preventing it from being masked correctly when the dataset is read. This seems contrary to the documentation, and is a new behavior in v1.5.1.A workaround is to not call
set_fill_off()
.The text was updated successfully, but these errors were encountered: