-
Notifications
You must be signed in to change notification settings - Fork 214
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
Incorrect behavior of geod.npts #1282
Comments
This change appears to be connected to #841. With pyproj 3.0.1: >>> import math
>>> from pyproj import Geod
>>> geod = Geod(ellps="WGS84")
>>> geod.npts(math.nan, 1.0, 2.0, math.nan, npts=1)
[(nan, nan)] With pyproj 3.1.0: >>> import math
>>> from pyproj import Geod
>>> geod = Geod(ellps="WGS84")
>>> geod.npts(math.nan, 1.0, 2.0, math.nan, npts=1)
[(nan, 0.9999999999999998)] cc: @idanmiara |
Possibly connected to this change as well: #825 |
|
Seems the change started in #841 |
It seems the issue has to do with Line 400 in 3d0fb75
|
Fix in #1288 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
This is my first post here, first and foremost I would like to thank you all for doing a fantastic work with this package:)
I am working on a project where pyproj is used and came across a strange behavior. I haven't checked every version to check where exactly did the issue start happening but it seems to be happening for the newest 3.5.0.
Consider the following:
Problem description
I would expect
.npts
to always return a tuple of nans when called on input containing nans. This however doesn't seem to be the case. I checked other possibilities with 2x np.nan or 1x np.nan in the input but only these two seem to be problematic.Expected Output
[(np.nan, np.nan)]
for bothEnvironment Information
pyproj info:
pyproj: 3.5.0
PROJ: 9.2.0
data dir: /usr/local/lib/python3.8/dist-packages/pyproj/proj_dir/share/proj
user_data_dir: /home/developer/.local/share/proj
PROJ DATA (recommended version): 1.13
PROJ Database: 1.2
EPSG Database: v10.082 [2023-02-06]
ESRI Database: ArcGIS Pro 3.1 [2023-19-01]
IGNF Database: 3.1.0 [2019-05-24]
System:
python: 3.8.10 (default, Mar 13 2023, 10:26:41) [GCC 9.4.0]
executable: /usr/bin/python3
machine: Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.29
Python deps:
certifi: 2022.6.15
Cython: 0.29.14
setuptools: 58.4.0
pip: 23.1
Installation method
poetry inside docker
What do you think?
The text was updated successfully, but these errors were encountered: