cupynumeric.unravel_index#

cupynumeric.unravel_index(
indices: ndarray,
shape: NdShape,
order: OrderType = 'C',
) tuple[ndarray, ...] | ndarray#

Converts a flat index or array of flat indices into a tuple of coordinate arrays.

Parameters:
  • indices (array_like) – An integer array whose elements are indices into the flattened version of an array of dimensions shape.

  • shape (tuple of ints) – The shape of the array to use for unraveling indices.

  • order ({'C', 'F'}, optional) – Determines whether the indices should be viewed as indexing in row-major (C-style) or column-major (Fortran-style) order.

Returns:

unraveled_coords – Each array in the tuple has the same shape as the indices array.

Return type:

tuple of ndarray

Availability:

Multiple GPUs, Multiple CPUs