iwopy.utils.RegularDiscretizationGrid.gpts2inds(gpts, allow_outer=True, error=True)[source]

Get grid indices of grid points.

Parameters

gpts: numpy.ndarray

The grid points, shape: (n_gpts, n_dims)

allow_outer: bool

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

error: bool

Flag for throwing error if off-grid, else return None in that case

Returns

inds: numpy.ndarray

The lower-left grid corner indices, shape: (n_gpts, n_dims)