tensor.ravel_index
Converts a multi-dimensional index to a one-dimensional index.
Args
self
(@Tensor<T>
) - The input tensor.indices
(Span<usize>
) - The indices of the Tensor to ravel.
Panics
Panics if the indices are out of bounds of the Tensor shape.
Returns
The index corresponding to the given indices.
Examples
Last updated