feat: add cast_value and scale_offset codecs#3874
Open
d-v-b wants to merge 9 commits intozarr-developers:mainfrom
Open
feat: add cast_value and scale_offset codecs#3874d-v-b wants to merge 9 commits intozarr-developers:mainfrom
d-v-b wants to merge 9 commits intozarr-developers:mainfrom
Conversation
Defines two new codecs that together provide a v3-native replacement for the existing `numcodecs.fixedscaleoffset` codec. The `cast_value` codec requires an optional dependency on the `cast-value-rs` package.
Contributor
Author
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3874 +/- ##
==========================================
- Coverage 92.98% 92.41% -0.57%
==========================================
Files 87 89 +2
Lines 11246 11423 +177
==========================================
+ Hits 10457 10557 +100
- Misses 789 866 +77
🚀 New features to boost your workflow:
|
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.
Defines two new codecs that together provide a v3-native replacement for the existing
numcodecs.fixedscaleoffsetcodec.The
cast_valuecodec requires an optional dependency on thecast-value-rspackage. The reason for bringing in rust here is because it gives us better average speed and much better memory usage than a numpy implementation. Happy to show this with benchmarks if needed.fwiw, I would rather not define these codecs in
zarr-python. In fact I already defined these codec classes in another package. But it's not possible to make zarr-python depend on an externally-defined codec without creating a circular dependency, so here we are. See discussion in the related issue.related, and possibly closes #3867