Skip to content

feat: allow generator expressions in highlevel operations that accept iterable of arrays as input#3938

Merged
ikrommyd merged 3 commits into
scikit-hep:mainfrom
ikrommyd:generator-expressions
Mar 31, 2026
Merged

feat: allow generator expressions in highlevel operations that accept iterable of arrays as input#3938
ikrommyd merged 3 commits into
scikit-hep:mainfrom
ikrommyd:generator-expressions

Conversation

@ikrommyd

Copy link
Copy Markdown
Member

Closes #3937

@github-actions

Copy link
Copy Markdown

The documentation preview is ready to be viewed at http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com/PR3938

@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.

@ikrommyd - great, thanks. Would it make sense to expand the tests to include axis parameter, deeply nested structures, record arrays, negative tests (e.g. with an invalid axis or bad nested structure), also type/shape checks?

@ikrommyd

Copy link
Copy Markdown
Member Author

Yeah I can add a little bit more testing although it would be over-testing mostly cause the only thing we want to test really is that generator expressions just behave the same as other iterables like lists or tuples (assuming axes and nestedness is tested in other tests).

@ianna

ianna commented Mar 30, 2026

Copy link
Copy Markdown
Member

Yeah I can add a little bit more testing although it would be over-testing mostly cause the only thing we want to test really is that generator expressions just behave the same as other iterables like lists or tuples (assuming axes and nestedness is tested in other tests).

I don't know if these are tested for generators... you might be right

@ikrommyd

Copy link
Copy Markdown
Member Author

I added a little more thorough testing. Should be good from my side now

@codecov

codecov Bot commented Mar 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.28%. Comparing base (7499387) to head (30199d8).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
Files with missing lines Coverage Δ
src/awkward/operations/ak_argcartesian.py 83.33% <100.00%> (+0.72%) ⬆️
src/awkward/operations/ak_cartesian.py 92.24% <100.00%> (+0.06%) ⬆️
src/awkward/operations/ak_concatenate.py 85.91% <100.00%> (+0.04%) ⬆️
src/awkward/operations/ak_zip.py 96.07% <100.00%> (+0.07%) ⬆️
src/awkward/operations/ak_zip_no_broadcast.py 86.44% <100.00%> (+0.23%) ⬆️

... and 6 files with indirect coverage changes

@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.

@ikrommyd - looks great! Thanks for addressing comments.

@ikrommyd
ikrommyd merged commit 0928fcc into scikit-hep:main Mar 31, 2026
41 checks passed
@ikrommyd
ikrommyd deleted the generator-expressions branch March 31, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some awkward operations fail on generator expressions

2 participants