dask 2021.10.0

ParametersReturns
unravel_index(indices, shape, order='C')

Some inconsistencies with the Dask version may exist.

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 . Before version 1.6.0, this function accepted just one index value.

shape : tuple of ints

The shape of the array to use for unraveling indices .

versionchanged

Renamed from dims to shape .

order : {'C', 'F'}, optional

Determines whether the indices should be viewed as indexing in row-major (C-style) or column-major (Fortran-style) order.

versionadded

Returns

unraveled_coords : tuple of ndarray

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

This docstring was copied from numpy.unravel_index.

See Also

ravel_multi_index

Examples

This example is valid syntax, but we were not able to check execution
>>> np.unravel_index([22, 41, 37], (7,6))  # doctest: +SKIP
(array([3, 6, 6]), array([4, 5, 1]))
This example is valid syntax, but we were not able to check execution
>>> np.unravel_index([31, 41, 13], (7,6), order='F')  # doctest: +SKIP
(array([3, 6, 6]), array([4, 5, 1]))
This example is valid syntax, but we were not able to check execution
>>> np.unravel_index(1621, (6,7,8,9))  # doctest: +SKIP
(3, 1, 4, 1)
See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /dask/array/routines.py#2065
type: <class 'function'>
Commit: