mindspore.numpy.flipud

mindspore.numpy.flipud(m)[源代码]

Flips the entries in each column in the up/down direction. Rows are preserved, but appear in a different order than before.

Parameters

m (Tensor) – Input array.

Returns

Tensor.

Raises

TypeError – If the input is not a tensor.

Supported Platforms:

GPU CPU

Example

>>> import mindspore.numpy as np
>>> A = np.arange(8.0).reshape((2,2,2))
>>> output = np.flipud(A)
>>> print(output)
[[[4. 5.]
[6. 7.]]
[[0. 1.]
[2. 3.]]]