flip

ivy.flip(x, axis=None, batch_shape=None, f=None)[source]

Reverses the ord of elements in an array along the given axis. The shape of the array is preserved, but the elements are reordered.

Parameters
  • x (array) – Input array.

  • axis (None or int or sequence of ints, optional) – Axis or axes along which to flip over. The default, axis=None, will flip over all axes.

  • batch_shape (sequence of ints, optional) – Shape of batch. Inferred from inputs if None.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.

Returns

An array with the entries of axis reversed.


Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty