You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inspired by z5py and with an eye on libraries doing similar things, I wrote https://github.com/clbarnes/h5py_like , which has a bunch of abstract base classes for Files, Groups and Datasets. An example where it wraps rust-n5 is here: https://github.com/clbarnes/rust-pyn5/tree/h5pylike/pyn5 . I don't propose rebasing z5py on that, but h5py_like's shape_utils module may be of interest: I started from the z5py implementation but have extended it in a couple of ways.
Specifically, it handles non-1 striding, and newaxes. It does it in a naive way: it lets the underlying library read out the unstrided data, and then strides (including reversing) in numpy if necessary (which is presumably a copy operation). Newaxes and squeezes are then applied by reshaping, which I think just returns a view.
The text was updated successfully, but these errors were encountered:
Specifically, it handles non-1 striding, and newaxes. It does it in a naive way: it lets the underlying library read out the unstrided data, and then strides (including reversing) in numpy if necessary (which is presumably a copy operation).
Cool! Supporting this in z5py directly would also be nice.
It does it in a naive way: it lets the underlying library read out the unstrided data,
I don't think we can do anything more clever here, so this sounds like a good solution.
A PR for strided views and newaxis support would be very welcome ;).
Inspired by z5py and with an eye on libraries doing similar things, I wrote https://github.com/clbarnes/h5py_like , which has a bunch of abstract base classes for Files, Groups and Datasets. An example where it wraps rust-n5 is here: https://github.com/clbarnes/rust-pyn5/tree/h5pylike/pyn5 . I don't propose rebasing z5py on that, but h5py_like's
shape_utils
module may be of interest: I started from the z5py implementation but have extended it in a couple of ways.Specifically, it handles non-1 striding, and newaxes. It does it in a naive way: it lets the underlying library read out the unstrided data, and then strides (including reversing) in numpy if necessary (which is presumably a copy operation). Newaxes and squeezes are then applied by reshaping, which I think just returns a view.
The text was updated successfully, but these errors were encountered: