Skip to main content

ravel_multi_index

Convert a tuple of index arrays into a flat index array for a given shape.
Returns: NDArray — Array of flat indices corresponding to the multi-dimensional indices.

unravel_index

Convert flat indices into a tuple of coordinate arrays for a given shape.
Returns: NDArray[] — Tuple of index arrays, one per dimension. Each array has the same shape as indices.

iindex

Perform integer (fancy) indexing on an array. Select elements from a using an array of integer indices.
Returns: NDArray — Array of elements selected from a at the given flat indices.

bindex

Perform boolean array indexing on an array. Select elements from a where the mask is true.
Returns: NDArray — 1-D array of elements from a where mask is true.