-
Notifications
You must be signed in to change notification settings - Fork 89
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: ufuncs on records should not be allowed unless overridden #1559
Conversation
Codecov Report
|
Now that ufuncs are no longer allowed for records in v2, test |
While it's possible that we'll find some tests that assume you can apply ufuncs (like In the definition of Point, a method was defined for awkward/tests/test_0355-mixins.py Lines 18 to 20 in afe5fc1
The rule should be that records can't be used in ufuncs unless a method has been defined for that particular ufunc, as is the case here. That's what |
…scikit-hep/awkward into ioanaif/fix-ufuncs-records-1439
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! recursively_apply
should be just like broadcast_and_apply
in requiring behavior
and not allowing records unless the records are overloaded.
Just need a test to be sure that np.absolute
will work if it is overloaded (like np.add
).
Once that test has been added and it passes, go ahead and merge.
* Added to recursively_apply for ufuncs on records * Renamed test to match PR nr * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Forward behavior in to check for overriden ufuncs * Added test for overloaded absolutefunction Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
#1439