-
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
feat: prevent reducers like ak.sum on records (v2) #1607
Conversation
Codecov Report
|
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.
Great! I just have one requested change. You've added a behavior-lookup, and there's a common form for those in helper functions in _util. See below.
With that behavior-lookup refactored out to _util.py, this will be ready. Re-request me to review it and I'll do a quick check, then merge.
Thanks!
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.
Discussed in meeting; this is ready to go!
utility
* policy: Prevent reducers like ak.sum on records (v2) * Pass behavior on the rest of the reducers * Made a util function for checking if a reducer function is overloaded for records * Switch using .split with .name * Add 'highlevel_function() utility
This PR addresses issue #1375:
If we have records whose fields represent non-Cartesian data, they should not be naively added (or otherwise "reduced")
In V2, this will now throw a TypeError
Error details: no ak.sum overloads for custom types: rho, phi