# mxnet.ndarray.ravel_multi_index¶

mxnet.ndarray.ravel_multi_index(data=None, shape=_Null, out=None, name=None, **kwargs)

Converts a batch of index arrays into an array of flat indices. The operator follows numpy conventions so a single multi index is given by a column of the input matrix.

Examples:

A = [[3,6,6],[4,5,1]]
ravel(A, shape=(7,6)) = [22,41,37]


Defined in src/operator/tensor/ravel.cc:L41

Parameters
• data (NDArray) – Batch of multi-indices

• shape (Shape(tuple), optional, default=[]) – Shape of the array into which the multi-indices apply.

• out (NDArray, optional) – The output NDArray to hold the result.

Returns

out – The output of this function.

Return type

NDArray or list of NDArrays