[IO-603][external] Update to work with current versions of NumPy #13
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.
Upolygon was stuck working with only NumPy versions 1.23.5 and below, as it used a
dtype=np.int
which was deprecated in NumPy1.24.0
This update updates the
dtype
to the nearest equivalent which isnp.int_
- the alias for the C typelong
. It's a minor change, and doesn't make any difference to the compiled code, as this will uselong
anyway, but will avoid raised errors in usage of Upolygon, which are of Fatal type.Same has been done with
np.float
tonp.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 Pythonint
etc are better suited. Won't affect performance as C-type will still be long, as it's defined in acdef
.@simedw and @andreaazzini comments welcomed especially, as you have greatest exposure to code base, thanks 馃槃