Back to Numerical Arrays (NumPy)
np.flip
Reverse the order of elements in an array along the given axis.
Syntax
np.flip(arr, axis?)
Description
Reverse the order of elements in an array along the given axis.
Parameters
| Name | Description |
|---|---|
| arr | - Input array |
| axis(optional) | - Axis or axes along which to flip. Default is to flip all axes. |
Returns
NDArray