iwopy.utils.RegularDiscretizationGrid.is_gridpoint(p, allow_outer=True, ret_inds=False)[source]

Checks if a point is on grid.

Parameters

p: numpy.ndarray

The point, shape: (n_dims,)

allow_outer: bool

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

ret_inds: bool

Additionally return indices

Returns

bool :

True if on grid

inds: numpy.ndarray, optional

The grid point indices, shape: (n_dims,)