You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Otherwise, any method that takes an axis fails like this:
AttributeError: 'Record' object has no attribute 'axis_wrap_if_negative'
This affects both v1 and v2. It's a bug, so it should be fixed in both, but v2 is higher priority if there's only time to fix one of them. The fix in v2 can be in Python; the fix in v1 has to be C++ code.
Fields of a record don't count as an axis, so the implementation would be to just pass it to self._array.axis_wrap_if_negative.
However, if the axis that this function returns is equal to 0, that should be an error. The user is trying to compute something on a top-level array, but the top-level is a scalar, not an array. We don't want to pass that through self._array.axis_wrap_if_negative and have, for instance, ak.to_regular(record, axis=0) return an array, especially if that ignores the Record's _at attribute and returns an output containing what had been hidden data.
The text was updated successfully, but these errors were encountered:
Version of Awkward Array
HEAD
Description and code to reproduce
Otherwise, any method that takes an
axis
fails like this:This affects both v1 and v2. It's a bug, so it should be fixed in both, but v2 is higher priority if there's only time to fix one of them. The fix in v2 can be in Python; the fix in v1 has to be C++ code.
Fields of a record don't count as an
axis
, so the implementation would be to just pass it toself._array.axis_wrap_if_negative
.However, if the
axis
that this function returns is equal to0
, that should be an error. The user is trying to compute something on a top-level array, but the top-level is a scalar, not an array. We don't want to pass that throughself._array.axis_wrap_if_negative
and have, for instance,ak.to_regular(record, axis=0)
return an array, especially if that ignores the Record's_at
attribute and returns an output containing what had been hidden data.The text was updated successfully, but these errors were encountered: