mindspore.ops.cummin
- mindspore.ops.cummin(input, axis)[source]
Return the cumulative minimum values and their indices along the given axis of the tensor.
- Parameters
- Returns
Tuple(min, min_indices) of 2 tensors.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> from mindspore import Tensor, ops >>> import mindspore >>> a = Tensor([-0.2284, -0.6628, 0.0975, 0.2680, -1.3298, -0.4220], mindspore.float32) >>> output = ops.cummin(a, axis=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]