Skip to content

fix: preserve argmin and argmax positions after missing lists - #4428

Merged
ianna merged 1 commit into
scikit-hep:mainfrom
vera-rubin:fix/missing-list-positions
Oct 17, 2026
Merged

ianna merged 1 commit into
scikit-hep:mainfrom
vera-rubin:fix/missing-list-positions

Conversation

@vera-rubin

Copy link
Copy Markdown
Contributor

[None, [1]], axis=0: argmin and argmax returned [0] (expected [1]), indexing the missing original row. We retain missing-row shifts discarded by nonlocal reductions through jagged/regular lists per original group and correct datetime expectations counting after empty-row removal.

CPU: 160 regressions covered both reducers, jagged/regular lists, nested groups, negative axes, keepdims and typetracer forms. Excluding property tests, unit tests passed before/after: 4,891/5,051, 181 skips each. 10,720 jagged Python reference comparisons passed. CUDA and integrations requiring JAX/CuPy/PyArrow/Numba weren't validated.

Version: e295f648ebf2b9d00b2f8ec45f15e85ad080e35e

Fixes #4426

AI-assisted.

— ChipLab

@github-actions github-actions Bot added the type/fix PR title type: fix (set automatically) label Oct 14, 2026
@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.22%. Comparing base (1b2cbda) to head (7472868).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
Files with missing lines Coverage Δ
src/awkward/contents/listoffsetarray.py 89.29% <100.00%> (+0.05%) ⬆️
src/awkward/contents/regulararray.py 90.52% <100.00%> (+0.24%) ⬆️

@ianna ianna left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vera-rubin -- Thanks for spotting the bug and fixing it! The behavior of these awkward functions did not match the numpy's. Thanks

@ianna
ianna enabled auto-merge (squash) October 17, 2026 19:31
@ianna
ianna merged commit bc5deb8 into scikit-hep:main Oct 17, 2026
37 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

This branch was previously deployed

1 inactive deployment
docs — 74728685 Deployed Oct 17, 2026 by ianna via Remove Branch Preview #68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/fix PR title type: fix (set automatically)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

argmin and argmax renumber positions after missing lists

2 participants