Repository navigation
Conversation
Restore the shape declared by the filter and normalize decode input to C order after a transpose. Extend the existing round-trip cases to cover a following TransposeCodec without relaxing exact array equality. The shape-restoration approach follows ghuls's draft in zarr-developers#4553. Signed-off-by: Don Yin <Don_Yin@outlook.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4558 +/- ##
=======================================
Coverage 94.71% 94.71%
=======================================
Files 94 94
Lines 13663 13664 +1
=======================================
+ Hits 12941 12942 +1
Misses 722 722
🚀 New features to boost your workflow:
|
|
Thanks for fixing it properly. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4553.
Some Numcodecs filters (e.g. PackBits) return a flat array, so a following TransposeCodec fails on write. This reshapes the encoded output to the shape from
resolve_metadata.Reshaping alone isn't enough: after undoing the transpose the array can be F-ordered, and Numcodecs decodes in memory order, so Delta and FixedScaleOffset round-trips come back scrambled. Making the input C-contiguous before decoding fixes that.
Builds on @ghuls's draft in the issue. The existing filter round-trip test now also runs with a following transpose.
TODO
docs/user-guide/*.md(n/a)changes/