Skip to content

Add a function to fill NaNs in a grid #439

@leouieda

Description

@leouieda

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIdea or request for a new feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions