```python >>> arr = ndtest("a=a0,a2,a1") >>> arr a a0 a2 a1 0 1 2 >>> g = arr.a.i[1] >>> g a.i[1] >>> arr[g] 1 >>> arr.sum(g) 1 ``` Now let us define another array with the same axis name, and reuse the `g` group: ```python >>> arr2 = ndtest("a=a0..a2") >>> arr2 a a0 a1 a2 0 1 2 ``` For getitem, the group is retargeted to the "local array" axis (i.e. arr2.a) by using the _labels_ corresponding to the group on the original axis: ```python >>> arr2[g] 2 ``` But for group aggregates, this is the position, irrespective of the label: ```python >>> arr2.sum(g) 1 ``` This is because of the: ```python axis_key = axis_key.with_axis(real_axis) ``` line in AxisCollection._guess_axis which should probably use retarget_to instead.