georust / netcdf

High-level netCDF bindings for Rust
Apache License 2.0
81 stars 28 forks source link

Change selectors for put/get #101

Closed magnusuMET closed 1 year ago

magnusuMET commented 1 year ago

Would be nice to see a more ergonomic way for the user to set the size of a variable or the slice size. We could borrow the implementation from the hdf5 crate.

This would enable the following patterns

var.get((.., 4..2, 5));
var.get(..);  // everything
var.put((4, 5, ..));
var.put(4); // scalar put
varbuilder.shape((.., 50, 80));  // one unlimited dimension