mindspore.numpy.fliplr

View Source On Gitee
mindspore.numpy.fliplr(m)[source]

Flips the entries in each row in the left/right direction. Columns 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.fliplr(A)
>>> print(output)
[[[2. 3.]
[0. 1.]]
[[6. 7.]
[4. 5.]]]