Inf vs NaN
See original GitHub issueCurrently pyproj returns inf
whenever a projection operation fails, which is coherent with the behaviour of PROJ. However, I could see some benefits from changing this to NaN
, see https://github.com/OSGeo/PROJ/issues/2376.
Since the PROJ developers are cautious making such a breaking change, would it be an option to expose NaN
instead of inf
in pyproj? Downstream applications using np.isfinite
to filter invalid values would not be affected, since this also filters NaN
. It would be a breaking change for users checking lat > 90
for instance.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
What is inf and nan? - Stack Overflow
inf is infinity - a value that is greater than any other value. -inf is therefore smaller than any other value. nan stands...
Read more >Infinity and NaN (The GNU C Library)
In comparison operations, positive infinity is larger than all values except itself and NaN, and negative infinity is smaller than all values except...
Read more >Finite, Infinite and NaN Numbers - R
Inf and -Inf are positive and negative infinity whereas NaN means 'Not a Number'. (These apply to numeric values and real and imaginary...
Read more >Did You Know Float(“NaN”) and Float(“inf”) Exist in Python?
For those who are unfamiliar with the notation of inf and NaN, they stand for infinity and Not-a-Number, respectively.
Read more >Check if the value is infinity or NaN in Python - GeeksforGeeks
Check for NaN values in Python · 0/0 is undefined and NaN is used for representing it. · Sqrt(-ve number) cannot be stored...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s where all cython developers start ⚡ . If you have any questions, feel free to reach out.
@snowman2 For sure! I don’t have much experience with Cython, but so I can improve my knowledge.