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
>>>ak.sum(array.y, axis=0), ak.sum(array.y, axis=-3)
(<Array [[2, 2]] type='1 * var * int64'>, <Array [[2, 2]] type='1 * var * int64'>)
We could derive that from the minmax_depth:
>>>array.layout.minmax_depth
(2, 3)
which doesn't say which has depth 2 and which has depth 3, just that something does. If a given axis is negative and
-axis > min(array.layout.minmax_depth), then it will be an index out of range error for some part of the array
min(array.layout.minmax_depth) <= -axis <= max(array.layout.minmax_depth), then it will be axis == 0 for some part of the array
-axis < min(array.layout.minmax_depth), then it will be axis != 0 for all parts of the array.
This last case is one that you can always offload to Awkward. If
-axis == min(array.layout.minmax_depth) == max(array.layout.minmax_depth), then it's a valid request, equivalent to axis == 0, but not handled by dask-awkward (NotImplementedError).
The only other case, -axis > min(array.layout.minmax_depth) would even be an Awkward axis out of range error (np.AxisError, but maybe ValueError?).
Determining if
axis
is equivalent to zero if it's negative...Given this array,
For
x
,axis=-2
is equivalent toaxis=0
:For
y
,axis=-3
is equivalent toaxis=0
:We could derive that from the
minmax_depth
:which doesn't say which has depth
2
and which has depth3
, just that something does. If a givenaxis
is negative and-axis > min(array.layout.minmax_depth)
, then it will be an index out of range error for some part of the arraymin(array.layout.minmax_depth) <= -axis <= max(array.layout.minmax_depth)
, then it will beaxis == 0
for some part of the array-axis < min(array.layout.minmax_depth)
, then it will beaxis != 0
for all parts of the array.This last case is one that you can always offload to Awkward. If
-axis == min(array.layout.minmax_depth) == max(array.layout.minmax_depth)
, then it's a valid request, equivalent toaxis == 0
, but not handled by dask-awkward (NotImplementedError).The only other case,
-axis > min(array.layout.minmax_depth)
would even be an Awkward axis out of range error (np.AxisError
, but maybeValueError
?).I expected that to be an
np.AxisError
, not aValueError
...Originally posted by @jpivarski in #151 (comment)
The text was updated successfully, but these errors were encountered: