mindspore.mint.cummin
- mindspore.mint.cummin(input, dim)[source]
Return the cumulative minimum values and their indices along the given dimension of the tensor.
\[\begin{split}\begin{array}{ll} \\ y_{i} = \min(x_{1}, x_{2}, ... , x_{i}) \end{array}\end{split}\]Note
GE backend is not supported in Ascend.
- Parameters
- Returns
Tuple of two tensors, tuple(min, min_indices).
- Supported Platforms:
Ascend
Examples
>>> import mindspore >>> a = mindspore.tensor([-0.2284, -0.6628, 0.0975, 0.2680, -1.3298, -0.4220], mindspore.float32) >>> output = mindspore.mint.cummin(a, dim=0) >>> print(output[0]) [-0.2284 -0.6628 -0.6628 -0.6628 -1.3298 -1.3298] >>> print(output[1]) [0 1 1 1 4 4]