-
Couldn't load subscription status.
- Fork 19
skip NaN in extent calculation
#166
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Anshul Singhvi <[email protected]>
|
The weird thing about this (that I just realised for Extents.jl as well) is that for |
|
@evetion would be good to get a review and merge on this |
|
LGTM, I haven't hit this specific use case yet. Can you document the behaviour in the docstring(test?) somewhere. All NaN points will still yield a NaN extent right? |
|
For sure, a doc comment would help. And yes all NaN still returns NaN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I added some documentation as well.
|
We should ask what other ecosystems do at SDSL |
|
I think having NaN anywhere is unwanted/unexpected, so either we can introduce a keyword to enable this behaviour, or warn when skipping NaNs. We might even error when all is NaN, as having a NaN Extent is unusable in the rest of the ecosystem? |
This PR fixes the problem where NaNs win over other coordinates to make
NaNextents that don't work anywhere. Or do work in DimensionalData.jl and becauseNaNcomparisons always returnfalse, it just selects the maximum possible extent.To do this I switch
extremato_nan_free_extrema, which turns out to be faster anyway.This PR will be coupled with a PR for
Extents.unionandExtents.intersectionto behave the same way, and for DimensionalData.jl to check forNaNextents for the rare few that still get through.