-
Notifications
You must be signed in to change notification settings - Fork 6
Handle dimensions consistently #64
Comments
Further to discussion on slack, rust-n5's read/write_ndarray sets axis flags correctly, and numpy largely handles the different view orders for you, so really we just need to
|
The rust/ low-level side is consistent with the java implementation; the h5py-like side manages the conversions as necessary. There is not currently a method for retrieving the dataset metadata in order, but I don't know if it's worth it: if you remember to use that method, you may as well just remember to do the inversion yourself. That would be necessary anyway if the attribute were anything but a 3-tuple. |
We were thinking about de-ambiguating array axes via tiny arrays which contain axis ID numbers at some of their corners. Indexing into the special corners of this array would return a number that indicates whether metadata should be read in python or java order. That's probably super confusing. Here's an example: In 2D, we would make the following array: tl;dr -- you can solve the axis order ambiguity issue by creating a little array that, when indexed, returns a number that encodes whether metadata are stored in [a,b,c] or [c,b,a] order. |
As discussed, N5 stores dimension metadata in java/fortran order. z5py (and presumably zarr) reverses that metadata and transposes the returned arrays into numpy/C order. pyn5 should do the same.
The text was updated successfully, but these errors were encountered: