Add a function to fill NaNs in a grid
Description of the desired feature:
This is a surprisingly hard thing to do so it would be nice to have an easy function that does this. Here's what I propose:
def fill_nans(grid, neighbors=1):
# Make the grid into a table
# Make KNeighbors interpolator with the given neighbors
# Fit the interpolator.
# Predict on the NaN values
# Make a new grid
return filled_grid
Are you willing to help implement and maintain this feature?
Yes
Related to https://github.com/fatiando/harmonica/issues/396
Hello,
I Would like to contribute to thie feature. I'm geology student and work as a programmer, and i'm starting to contribute to open-source code in geosciences.
Regarding this feature, would the function go inside io.py?
Hi @Phssilva thank you for volunteering! It could go into verde/utils.py for now. We can move it and some other functions into a separate file later.
Do you need any help getting started? Make sure you've looked at our Contributing Guide and let us know if anything in there isn't clear.
Hi @leouieda , I've read about contributions, and here we go, starting my first contribution to an open-source code. Thanks for your attention. If I have any questions regarding the implementation, I'll put them there.
Awesome! Thank you for taking this on.
Please open the pull request as soon as you have a commit. It doesn't have to be done before you open the PR. Having the PR open gives us a place to discuss and ask questions. Plus, it lets us know how you're progressing.