Barak 0.3.2 documentation

barak.utilities.indices_from_grid

«  barak.utilities.indgroupby   ::   Contents   ::   barak.utilities.meshgrid_nd  »

barak.utilities.indices_from_grid

barak.utilities.indices_from_grid(c, ref)[source]

Convert coordinates to indices defined by grid of reference values.

Parameters :

c : array of floats, shape (M,)

Coordinates.

ref : array of floats, shape (N,)

Reference grid coordinates. They must be equally spaced.

Returns :

ind : arrays of floats

Coordinates mapped onto the indices of the reference grid.

«  barak.utilities.indgroupby   ::   Contents   ::   barak.utilities.meshgrid_nd  »