iwopy.utils.RegularDiscretizationGrid.find_gridpoints(pts, allow_outer=True, ret_inds=False)[source]

Finds points that are on grid.

Parameters

pts: numpy.ndarray

The points, shape: (n_pts, n_dims)

allow_outer: bool

Allow outermost point indices, else reduce those to lower-left cell corner

ret_inds: bool

Additionally return indices

Returns

sel_grid: numpy.ndarray of bool

Subset selection of points that are on grid, shape: (n_pts, n_dims)

inds: numpy.ndarray, optional

The grid point indices, shape: (n_gpts, n_dims)