-
Notifications
You must be signed in to change notification settings - Fork 96
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
Update optimized Delta
codec for bool
#595
Merged
Merged
Conversation
This file contains 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
Previously `bool` just worked with `Delta`. However this was not actually tested. The optimized version switched to `np.subtract` for in-place computation, which works for other types. Though `bool` needs special handling. Fortunately this can be done with `np.not_equal`, which has the same behavior. Also include a test for `bool` data to make sure this is handled correctly going forward.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #595 +/- ##
=======================================
Coverage 99.91% 99.91%
=======================================
Files 59 59
Lines 2332 2334 +2
=======================================
+ Hits 2330 2332 +2
Misses 2 2
|
6 tasks
d-v-b
approved these changes
Oct 10, 2024
Closing and reopening to retry RTD (as it didn't run) |
Closing and reopening as AppVeyor came up (we don't use that any more) |
This is a bit more succinct and gets to the core point. Namely `arr.dtype` determines this code path. Also comparing directly to `bool` works here. It is a bit faster as well since we need not construct an `np.dtype` object.
1d0b293
to
b2cccc1
Compare
Sorry for the CI related noise This is now ready! 😀 |
dstansby
approved these changes
Oct 12, 2024
Closed
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.
Previously
bool
just worked withDelta
. However this was not actually tested. The optimized version switched tonp.subtract
for in-place computation, which works for other types. Thoughbool
needs special handling. Fortunately this can be done withnp.not_equal
, which has the same behavior.Also include a test for
bool
data to make sure this is handled correctly going forward.TODO: