-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support for attributes with different dtypes when serialising to netcdf4 #1500
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
Comments
These aren't supported by the netCDF4 file format, so there's not a straightforward way to add them. We could add some custom serialization logic (like we do for variable dtypes like I suppose as a last resort we could write such attributes as bytestrings in some custom serialization format, but then it has the downside of not being readable by any other tool. |
I guess this could work as part of your PR #1421 to support using pickle for array values. |
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here or remove the |
Still relevant |
At the moment, bool and dates aren't supported as attributes when serializing to netcdf4:
I assume bool attributes aren't supported by
netcdf4-python
and dates are difficult (could always just write these as a string), but this would be really nice to have if possible.As an aside, using
h5netcdf
works for bools, but coerces them to int64.The text was updated successfully, but these errors were encountered: