Conversation
On 32-bit platforms numpy's default integer is int32 and object arrays use 4-byte pointers. Give the test data explicit int64 dtypes and derive the expected sizes of object arrays from the pointer size. Co-authored-by: Claude <noreply@anthropic.com>
dcherian
approved these changes
Oct 5, 2026
dcherian
left a comment
Contributor
There was a problem hiding this comment.
Would be great if we can generate a ruff lint rule for this.
IIRC there were some floating around for the numpy2 transition
Collaborator
Author
I guess you meant the NPY201 rule. Unfortunately ruff does not have a plugin system so you cannot simply add custom rules. |
2 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix the tests that fail on 32-bit platforms, where numpy's default integer is
int32and object arrays use 4-byte pointers.int64dtype where the tests assume itfake_target_chunksizefor cftime depend on the pointer sizeVerified by running the test suite in an
i386/debian:trixiecontainer and comparing withdebian:trixie(amd64) using the same packages: no failures left that only happen on 32-bit.We will not add a 32-bit CI pipeline run since there are no pandas, scipy 32-bit packages anymore and there is also no conda-forge 32-bit platform. I guess if any remaining or future tests fail thats just a limitation we have to deal with.
Note: The Gentoo report also listed groupby keep_attrs, test_reduce_keepdims and test_strategies::TestReduction::test_mean. Those didn't fail in my 32-bit Debian run. Debian has different or older versions of numpy, bottleneck and dask than Gentoo, and no numbagg, so I couldn't check them.
Checklist
AI Disclosure
Tools: Claude Code
🤖 Generated with Claude Code