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

feat: Allow interoperability with numpy 2.x #3064

Merged
merged 21 commits into from
Apr 1, 2024
Merged

Conversation

tcawlfield
Copy link
Collaborator

We would like to allow awkward to work correctly with numpy 2.x.

This works in numpy 1.26.4 at least. There are warnings about
accessing numpy internals, so we'll see what happens next.
This was removed from top-level namespace in numpy 2.0, but all versions
allow np.exceptions.AxisError.
ak_full_like.py feels like it could use a touch of refactoring.
This should work (by not triggering) for numpy 1.x again.
@tcawlfield tcawlfield self-assigned this Mar 27, 2024
@tcawlfield tcawlfield linked an issue Mar 27, 2024 that may be closed by this pull request
@jpivarski
Copy link
Member

I'll review it when it's done. (We use the "request review" button as a way to get my attention to review it when it's time to decide if it can be merged as-is or needs changes. The "ready for review" button doesn't send me an email, but "request review" does.)

@tcawlfield tcawlfield changed the title Feature: Allow interoperability with numpy 2.x feat: Allow interoperability with numpy 2.x Mar 29, 2024
@jpivarski jpivarski marked this pull request as ready for review April 1, 2024 15:53
@jpivarski
Copy link
Member

@ManasviGoyal, (real?) errors in these two kernel tests are being caught by NumPy 2.0, and not by 1.x: 2bcb015

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.

Approved! We pair-programmed on Zoom.

@jpivarski jpivarski enabled auto-merge (squash) April 1, 2024 18:05
@jpivarski jpivarski merged commit b390ca6 into main Apr 1, 2024
39 checks passed
@jpivarski jpivarski deleted the 2936-test-against-numpy-20 branch April 1, 2024 18:18
@rgommers
Copy link

rgommers commented Apr 1, 2024

Great to see this! I'm making a compatibility overview for numpy 2.0; can I ask what version of Awkward Array this will land in?

@jpivarski
Copy link
Member

Awkward 2.6.3, which is waiting on one more fix from #3068. I hope it will be done today.

@jpivarski
Copy link
Member

@rgommers, Awkward Array 2.6.3 (GitHub, PyPI) has been released with NumPy 2.0 support.

@rgommers
Copy link

rgommers commented Apr 2, 2024

Awesome, thanks @jpivarski.

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.

Test against NumPy 2.0
3 participants