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

Explicitly set the numpy type passed in QueryExperimental::set_data_buffer #2128

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

kounelisagis
Copy link
Member

QueryExperimental::set_data_buffer requires an unsigned integer as its last argument. It seems that with numpy versions earlier than 2, this argument becomes a numpy float64 (with buffer_sizes[i] being a numpy uint64 and ncells being a Python int).

Let's fix it by explicitly cast to numpy uint64.

Closes #2127, closes #2124.

@kounelisagis kounelisagis requested a review from ihnorton January 3, 2025 10:05
Copy link
Member

@ihnorton ihnorton left a comment

Choose a reason for hiding this comment

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

LGTM, thanks (confirmed locally). We need to add a test variation against numpy 1 as discussed, but that can be done separately.

@ihnorton ihnorton merged commit a6f4fdc into main Jan 3, 2025
64 checks passed
@ihnorton ihnorton deleted the agis/fix-np-float branch January 3, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants