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
{{ message }}
Repository navigation
Group aggregate has wrong (and different than getitem!) behavior for groups from other axes #1117
changed the title [-]Group aggregate has wrong (and different than getitem!) behavior for igroups from another axis[/-][+]Group aggregate has wrong (and different than getitem!) behavior for groups from other axes[/+]on Oct 2, 2024
In fact, the problem caused by that line is present for LGroup too (but there only for slice groups):
>>>arr=ndtest(3)
>>>arraa0a1a2012>>>a2=Axis('a=a0,a2,a1')
>>>arr.sum(arr.a['a0:a1'])
1>>>arr.sum(a2['a0:a1']) # should be 31
And in fact, I just noticed I had already found and fixed this bug in one of my local branches (slice_groups_incompatible_axis) almost two years ago. Pffff... 😭
I am not 100% sure we should have this retarget behavior in the first place. Both can be confusing. But I am 100% sure getitem and group aggregate should behave the same.
Since it modifies behavior (and some models actually rely on it -- I wonder if the occurences I found are bugs in the models or not), I only added a warning, will turn that to an error in 0.36 and only change the behavior in 0.37 or possibly later for users who skip releases 😞
Activity
[-]Group aggregate has wrong (and different than getitem!) behavior for igroups from another axis[/-][+]Group aggregate has wrong (and different than getitem!) behavior for groups from other axes[/+]gdementen commentedon Oct 2, 2024
In fact, the problem caused by that line is present for LGroup too (but there only for slice groups):
And in fact, I just noticed I had already found and fixed this bug in one of my local branches (slice_groups_incompatible_axis) almost two years ago. Pffff... 😭
I am not 100% sure we should have this retarget behavior in the first place. Both can be confusing. But I am 100% sure getitem and group aggregate should behave the same.
gdementen commentedon Nov 17, 2025
yvda stumbled on this one too.
gdementen commentedon Nov 17, 2025
There is probably also a problem in _group_aggregate:
In fact, I should search for all places where with_axis is used. Unsure any use makes sense.
FIX: fixed array[slice_group_from_an_incompatible_axis] (fixes larray…
FIX: fixed array[slice_group_from_an_incompatible_axis] (fixes larray…
FIX: fixed array[slice_group_from_an_incompatible_axis] (fixes #1146 …
gdementen commentedon Dec 5, 2025
fixed by #1149
gdementen commentedon Dec 18, 2025
Since it modifies behavior (and some models actually rely on it -- I wonder if the occurences I found are bugs in the models or not), I only added a warning, will turn that to an error in 0.36 and only change the behavior in 0.37 or possibly later for users who skip releases 😞
FIX: do not change buggy behavior users rely on yet (see #1117 and #1146