We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Unless explicitly overridden, ufuncs are not supposed to work on records. In v1:
>>> array = ak.Array([{"x": 1.0, "y": 1.1}, {"x": 2.0, "y": 2.2}]) >>> np.absolute(array) Traceback (most recent call last): ... File "/home/jpivarski/irishep/awkward-1.0/awkward/_util.py", line 1058, in apply raise ValueError( ValueError: cannot broadcast records in this type of operation (https://github.com/scikit-hep/awkward-1.0/blob/1.9.0rc2/src/awkward/_util.py#L1060)
(that's good), but in v2:
>>> array = ak._v2.Array([{"x": 1.0, "y": 1.1}, {"x": 2.0, "y": 2.2}]) >>> np.absolute(array) <Array [{x: 1, y: 1.1}, {x: 2, ...}] type='2 * {x: float64, y: float64}'>
(that's bad).
In v1, this was issue #457 and PR #510, which added:
https://github.com/scikit-hep/awkward-1.0/blob/779819e0405cd481dbae0976fc311f2f1d91d9b5/src/awkward/_util.py#L1057-L1061
It looks like the check was copied into v2:
https://github.com/scikit-hep/awkward-1.0/blob/779819e0405cd481dbae0976fc311f2f1d91d9b5/src/awkward/_v2/_broadcasting.py#L653-L656
but it's not being triggered in the above example for some reason.
Originally posted by @jpivarski in #1437 (comment)
The text was updated successfully, but these errors were encountered:
ioanaif
No branches or pull requests
Unless explicitly overridden, ufuncs are not supposed to work on records. In v1:
(that's good), but in v2:
(that's bad).
In v1, this was issue #457 and PR #510, which added:
https://github.com/scikit-hep/awkward-1.0/blob/779819e0405cd481dbae0976fc311f2f1d91d9b5/src/awkward/_util.py#L1057-L1061
It looks like the check was copied into v2:
https://github.com/scikit-hep/awkward-1.0/blob/779819e0405cd481dbae0976fc311f2f1d91d9b5/src/awkward/_v2/_broadcasting.py#L653-L656
but it's not being triggered in the above example for some reason.
Originally posted by @jpivarski in #1437 (comment)
The text was updated successfully, but these errors were encountered: