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

Remove special-case casting support for numpy<2.0 #1309

Open
greglucas opened this issue Jun 22, 2023 · 1 comment
Open

Remove special-case casting support for numpy<2.0 #1309

greglucas opened this issue Jun 22, 2023 · 1 comment
Labels
proposal Idea for a new feature.

Comments

@greglucas
Copy link
Contributor

Once we support only Numpy 2.0+ we can remove the casting checks we have added to the Cython code for single-point transforms and Geod's fwd/inv single-point as well. Right now we make sure to throw a TypeError so we get the right conversions, but Numpy 2.0+ will do this for us automatically.

# We do the type-checking internally here due to automatically
# casting length-1 arrays to float that we don't want to return scalar for.
# Ex: float(np.array([0])) works and we don't want to accept numpy arrays

@greglucas greglucas added the proposal Idea for a new feature. label Jun 22, 2023
@snowman2
Copy link
Member

Possibly helpful guide to follow on numpy support window: https://scientific-python.org/specs/spec-0000/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Idea for a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants