Comments (5)
@adam2392 Thanks for raising this. A pure h5netcdf
MCVE would be nice nevertheless.
Attributes are always scalar values or 1D arrays, which can be associated with either a variable or the file as a whole. Although there is no enforced limit, the user is expected to keep attributes small.
So this means that this would be a non-standard usage which h5netcdf
could only support using invalid_netcdf
keyword arg.
Also HDF5 speaks of Attributes as small datasets.
How small is "small" is not defined by the library and is up to the userβs interpretation.
As the request is not conforming to the NetCDF4 standard I'm inclined to keep the current behavior. You might go the suggested way (HDF5-link above) of adding the data as another variable with an attribute pointing to it.
from h5netcdf.
Xref: mne-tools/mne-connectivity#87
from h5netcdf.
After reading the discussion over at mne-tools/mne-connectivity#87 I think I might be missing a bit of context.
@adam2392 In the mne-connectivity docs the output format is mentioned as NetCDF. What you request would finally create non-standard NetCDF files. Maybe I'm missing something. Could you shed some light?
from h5netcdf.
It isn't possible to directly put arbitrary NumPy object arrays into HDF5 files, because these can contain arbitrary Python objects that may not be supported by HDF5.
If desired, arbitrary Python objects could be serialized into bytes with pickle. But this would not be appropriate for h5netcdf unless users need to explicitly opt-in each time they open a file with pickle support (e.g., by specifying something like allow_pickle=True
), because deserializing pickle data allows arbitrary code execution.
from h5netcdf.
I'm closing this as wont-fix. If there is more discussion needed, please reopen @adam2392.
from h5netcdf.
Related Issues (20)
- h5netcdf writes invalid netcdf to existing netcdf files HOT 6
- Corrupted headers when serialising using dask.distributed client HOT 9
- Test failures with NetCDF 4.9.0 HOT 6
- Remove h5py2 related code and CI builds HOT 3
- FAILED h5netcdf/tests/test_h5netcdf.py::test_group_names HOT 6
- AttributeError for '_phony_dim_count' when trying to convert a file made with h5py HOT 12
- Tests test_more_than_7_attr_creation_track_order and test_bool_slicing_length_one_dim fail in the test suite HOT 18
- very slow partial reading when saved with index shift HOT 10
- h5py minimum version update? HOT 5
- Improving performance for h5netcdf HOT 7
- Documentation request: Alternative way to obtain h5netcdf HOT 1
- Segmentation fault after upgrading to h5netcdf==1.1.0 HOT 14
- ValueError raised when attribute has type `h5py.Reference` HOT 5
- support for HDF5 dimension scales with null dataspace HOT 2
- Modifying attributes safely is not possible with all datasets. HOT 10
- Better Error for illegal variable names HOT 3
- md5 checksum mismatch for identical files/data HOT 7
- Question: does `h5netcdf` bring in the entire data from a netCDF file on a remote disk (like S3)? HOT 5
- Provide an example with time dimension readable by paraview HOT 3
- transient vs committed types HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from h5netcdf.