Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change default interpolation to "nearest" to avoid logical error with…
… nan. Thumbs up of the merge - DF
- Loading branch information
4890374
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.
@fourndo : I am unsure of what is the best default for topogrpahy.
I chose cubic for the following reasons:
4890374
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.
I totally get your point @thast . And yes the issue was that the topo didn't cover all the corners of the mesh.
Would be great if griddata would also extrapolate on cubic and linear, but it doesn't. Issue with not having extrapolation is that nan are bad for the logical, and IF the topo is to short we end up with walls. Maybe we could add a print statement at some point to tell the user that the topo is too short.
Nearest is fast too, predictable and it has the advantage that you can technically specify a flat topo with a single point.
It's just for default anyway, user can be fancier if needed.
My two cents
4890374
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.
That's a good point, and a different way to look at it too than mine.
@lheagy brought a good point: if we add a proper documentation, we do not have to worry that much about what the users are going to use as input in the function, and then fixing the default based on this prediction. Users can be fancier, but we need to provide the documentation for that. I will add it soon.