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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IO-603][external] Update to work with current versions of NumPy #13

Merged
merged 3 commits into from
Mar 14, 2023

Conversation

owencjones
Copy link
Contributor

@owencjones owencjones commented Feb 14, 2023

Upolygon was stuck working with only NumPy versions 1.23.5 and below, as it used a dtype=np.int which was deprecated in NumPy 1.24.0

This update updates the dtype to the nearest equivalent which is np.int_ - the alias for the C type long. It's a minor change, and doesn't make any difference to the compiled code, as this will use long anyway, but will avoid raised errors in usage of Upolygon, which are of Fatal type.

Same has been done with np.float to np.floating - but notably here the fused type we use for this encompasses more than these, and not all of them, and we may need a better approach in future?

Reviewers to consider whether a different dtype would suit the python users of Upolygon better, as I've chosen this based on the C type, but we may find that Python int etc are better suited. Won't affect performance as C-type will still be long, as it's defined in a cdef.

@simedw and @andreaazzini comments welcomed especially, as you have greatest exposure to code base, thanks 馃槃

Copy link
Contributor

@Nathanjp91 Nathanjp91 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@simedw simedw left a comment

Choose a reason for hiding this comment

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

LGTM

@owencjones owencjones merged commit c1f9cf1 into master Mar 14, 2023
@owencjones owencjones deleted the io-605_update_numpy branch March 14, 2023 12:21
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.

None yet

3 participants