-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix(python): Change recognition of numba ufunc #15916
Merged
ritchie46
merged 8 commits into
pola-rs:main
from
deanm0000:fix_recognition_of_numba_func
Apr 28, 2024
Merged
fix(python): Change recognition of numba ufunc #15916
ritchie46
merged 8 commits into
pola-rs:main
from
deanm0000:fix_recognition_of_numba_func
Apr 28, 2024
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
deanm0000
requested review from
ritchie46,
stinodego,
c-peters,
alexander-beedie,
MarcoGorelli and
reswqa
as code owners
April 26, 2024 16:17
2 tasks
2 tasks
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15916 +/- ##
===========================================
+ Coverage 39.14% 81.23% +42.09%
===========================================
Files 1364 1382 +18
Lines 167705 176628 +8923
Branches 3031 3032 +1
===========================================
+ Hits 65646 143488 +77842
+ Misses 101592 32655 -68937
- Partials 467 485 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ritchie46
approved these changes
Apr 28, 2024
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.
At some point/version of numba or numpy "they" made it so the ufunc that gets handed to
__array_ufunc__
changes its class so that looking at the class doesn't distinguish a numba ufunc from a native numpy ufuncs. This is relevant because all the numpy/scipy native ufuncs are elementwise whereas the numba ufuncs probably aren't.Luckily, it still is the case that ufuncs produced by numba have a signature field whereas the native ufuncs have signature None so I just switched the custom ufunc to that check.