Skip to content
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

Add a function to fill NaNs in a grid #439

Open
leouieda opened this issue Mar 14, 2024 · 4 comments
Open

Add a function to fill NaNs in a grid #439

leouieda opened this issue Mar 14, 2024 · 4 comments
Labels
enhancement Idea or request for a new feature

Comments

@leouieda
Copy link
Member

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 fatiando/harmonica#396

@leouieda leouieda added the enhancement Idea or request for a new feature label Mar 14, 2024
@Phssilva
Copy link

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?

@leouieda
Copy link
Member Author

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.

@Phssilva
Copy link

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.

@leouieda
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Idea or request for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants