Skip to content
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

Support all valid values for transpose codec configuration in zarr v3 #7116

Open
frcroth opened this issue Jun 2, 2023 · 3 comments
Open

Comments

@frcroth
Copy link
Member

frcroth commented Jun 2, 2023

The codec spec (https://zarr-specs.readthedocs.io/en/latest/v3/codecs/transpose/v1.0.html) states that the "order" configuration key must be one of:

An array of integers specifying a permutation of 0, 1, …, n-1, where n is the number of dimensions in the decoded chunk representation provided as input to this codec.

The string "C", equivalent to specifying the identity permutation 0, 1, …, n-1. This makes the codec a no-op.

The string "F", equivalent to specifying the permutation n-1, …, 1, 0.

Currently, only C and F are supported.

@fm3
Copy link
Member

fm3 commented Oct 12, 2023

In #7288 I add the possibility to specify an IntArray transpose codec. However, it will still only work correctly for C and F order (either expressed by string or by 4,3,2,1,0).

@frcroth
Copy link
Member Author

frcroth commented Nov 13, 2023

C and F are now no longer supported in the spec.

@fm3
Copy link
Member

fm3 commented Jan 29, 2024

I learned today that this does not touch the AxisOrder or the AdditionalCoordinates order. Instead it is only applied when reading a chunk.

So for this we should change the ArrayOrder (not AxisOrder) from the C/F switch to arbitrary permutations.

This would then need adaptation for getting the view on the source chunk axisOrderXYZView (the flip boolean needs to instead become an additional permutation using the transpose codec)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants