Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support scalar returns from firsts #2815

Merged
merged 2 commits into from
Nov 13, 2023
Merged

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Nov 11, 2023

I noticed that we expect ak.firsts to return scalar values, which was broken in a recent refactoring PR.

Copy link

codecov bot commented Nov 11, 2023

Codecov Report

Merging #2815 (b70447d) into main (ad04fc7) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
Files Coverage Δ
src/awkward/operations/ak_firsts.py 94.44% <100.00%> (ø)

Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

axis=0 is a case I hadn't thought about, but I guess you're right that it should return a scalar (np.int64).

@agoose77
Copy link
Collaborator Author

axis=0 is a case I hadn't thought about, but I guess you're right that it should return a scalar (np.int64).

You and me both!

@agoose77 agoose77 merged commit bd2b4b2 into main Nov 13, 2023
37 checks passed
@agoose77 agoose77 deleted the agoose77/fix-firsts-axis-0 branch November 13, 2023 16:12
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.

2 participants