question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Currently 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:open
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
snowman2commented, Oct 15, 2020

I don’t have much experience with Cython, but so I can improve my knowledge.

That’s where all cython developers start ⚡ . If you have any questions, feel free to reach out.

1reaction
sfinkenscommented, Oct 15, 2020

@snowman2 For sure! I don’t have much experience with Cython, but so I can improve my knowledge.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found