SimPEG.electromagnetics.static.utils.closestPointsGrid#

SimPEG.electromagnetics.static.utils.closestPointsGrid(grid, pts, dim=2)[source]#

Move a list of points to the closest points on a grid.

Parameters:
grid(n, dim) numpy.ndarray

A gridded set of points

pts(m, dim) numpy.ndarray

Points being projected to gridded locations

dimint, default=2

Dimension of the points

Returns:
(m) numpy.ndarray

indices for the closest gridded location for all pts supplied.