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: Windows and 32-bit Linux default to 32-bit integers in sums and prods UNLESS it's NumPy 2.0 #3068

Merged
merged 4 commits into from
Apr 1, 2024

Conversation

jpivarski
Copy link
Member

Caught in this test: https://github.com/scikit-hep/awkward/actions/runs/8511994785/job/23312715586

Although we could check all platforms with

numpy._module.sum([given_dtype(0)]).dtype.type

I want to limit that to only the unusual platforms (Windows and 32-bit Linux) because the others are a quick lookup, and I don't want to slow down metadata-checking any more.

@jpivarski jpivarski requested a review from tcawlfield April 1, 2024 19:37
@jpivarski
Copy link
Member Author

This is a good hint that we should test NumPy 2.0 on all platforms. NumPy used to have a 32-bit/64-bit split on Windows only, but now its dtypes are consistent across all platforms. However, that means that we need to be ready for it, too.

Copy link
Collaborator

@tcawlfield tcawlfield left a comment

Choose a reason for hiding this comment

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

LGTM

@jpivarski jpivarski changed the title fix: determine Windows dtype from NumPy, because it depends on NumPy 1.x vs 2.0 fix: Windows and 32-bit Linux default to 32-bit integers in sums and prods UNLESS it's NumPy 2.0 Apr 1, 2024
@jpivarski jpivarski enabled auto-merge (squash) April 1, 2024 21:55
@jpivarski jpivarski merged commit 567fe38 into main Apr 1, 2024
42 checks passed
@jpivarski jpivarski deleted the jpivarski/determine-Windows-dtype-from-NumPy branch April 1, 2024 21:57
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