fliplr#
- ivy.fliplr(m, /, *, copy=None, out=None)[source]#
Flip array in the left/right direction. Flip the entries in each column in the left/right direction. Columns are preserved, but appear in a different order than before.
- Parameters:
- Return type:
Union
[Array
,NativeArray
]- Returns:
ret – Array corresponding to input array with elements order reversed along axis 1.
Examples
>>> m = ivy.diag([1, 2, 3]) >>> ivy.fliplr(m) ivy.array([[0, 0, 1], [0, 2, 0], [3, 0, 0]])
- Array.fliplr(self, /, *, copy=None, out=None)#
ivy.Array instance method variant of ivy.fliplr. This method simply wraps the function, and so the docstring for ivy.fliplr also applies to this method with minimal changes.
- Parameters:
self (
Array
) – The array to be flipped. Must be at least 2-D.out (
Optional
[Array
]) – optional output array, for writing the result to. (default:None
)
- Return type:
Array
- Returns:
ret – Array corresponding to input array with elements order reversed along axis 1.
Examples
>>> m = ivy.diag([1, 2, 3]) >>> m.fliplr() ivy.array([[0, 0, 1], [0, 2, 0], [3, 0, 0]])
- Container.fliplr(self, /, *, copy=None, out=None)#
ivy.Container instance method variant of ivy.fliplr. This method simply wraps the function, and so the docstring for ivy.fliplr also applies to this method with minimal changes.
- Parameters:
self (
Container
) – the container with arrays to be flipped. Arrays must be at least 2-D.out (
Optional
[Container
]) – optional output container, for writing the result to. (default:None
)
- Return type:
Container
- Returns:
ret – container including arrays corresponding to the input container’s array with elements order reversed along axis 1.
Examples
With one
ivy.Container
input:>>> m = ivy.Container(a=ivy.diag([1, 2, 3]), ... b=ivy.array([[1, 2, 3],[4, 5, 6]])) >>> m.fliplr() { a: ivy.array([[0, 0, 1], [0, 2, 0], [3, 0, 0]]), b: ivy.array([[3, 2, 1], [6, 5, 4]]) }