simpeg.electromagnetics.static.utils.closestPointsGrid#

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

Return indices of closest gridded points for a set of input points.

Deprecated since version 0.25.0: closestPointsGrid will be removed in SimPEG v0.27.0.

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:
(n,) numpy.ndarray

Indices of the closest gridded points for all pts supplied.