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

fix(python): Change recognition of numba ufunc #15916

Merged
merged 8 commits into from
Apr 28, 2024

Conversation

deanm0000
Copy link
Collaborator

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.

Copy link

codecov bot commented Apr 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.23%. Comparing base (a9c8b59) to head (90e9d19).
Report is 4 commits behind head on main.

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     
Flag Coverage Δ
python 74.67% <100.00%> (+35.53%) ⬆️
rust 78.36% <0.00%> (+39.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ritchie46 ritchie46 merged commit 49ef964 into pola-rs:main Apr 28, 2024
13 checks passed
Wouittone pushed a commit to Wouittone/polars that referenced this pull request Jun 22, 2024
@deanm0000 deanm0000 deleted the fix_recognition_of_numba_func branch August 26, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants