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

Support numpy 1.24 ragged array conversion #107

Merged
merged 1 commit into from
Jan 9, 2023

Conversation

ianthomas23
Copy link
Member

Fixes #106 and #49.

Implicit conversion of a ragged array (sequence of numpy arrays with incompatible shapes) in numpy 1.24 raises a ValueError rather than a warning. This is a solution to the problem inspired by holoviz/geoviews#608 (thanks @hoxbro). It is slightly more complicated than that GeoViews fix because we cannot test with numpy 1.24 until numba supports it, so here I am converting the warning that occurs for numpy < 1.24 into an error so that it is handled in the same way and in the same code path as the numpy >= 1.24 fix.

This PR also fixes the following warning:

FutureWarning: ``gather_statistics`` is deprecated and will be removed in a future release. Please use ``calculate_divisions`` instead.

@ianthomas23
Copy link
Member Author

I have manually checked all the CI run outputs and all of the ragged array warnings have been dealt with.

@ianthomas23
Copy link
Member Author

Merging this. We probably need to do a dev release and check downstream libraries.

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.

Support numpy 1.24
1 participant