pyproj4 / pyproj

Python interface to PROJ (cartographic projections and coordinate transformations library)
https://pyproj4.github.io/pyproj
MIT License
1.05k stars 212 forks source link

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

Open greglucas opened 1 year ago

greglucas commented 1 year ago

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.

https://github.com/pyproj4/pyproj/blob/f235f9b3067e4817ec34a95cfd1717d58fc95293/pyproj/_transformer.pyx#L768-L770

snowman2 commented 1 year ago

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