flip
Reverse the order of elements along the given axis or axes.
Returns:
NDArray — A new array with elements reversed along the specified axis.
fliplr
Flip an array left to right (reverse along axis 1). The input must have at least 2 dimensions.
Returns:
NDArray — Array with columns reversed. Equivalent to flip(m, 1).
flipud
Flip an array up to down (reverse along axis 0).
Returns:
NDArray — Array with rows reversed. Equivalent to flip(m, 0).
rot90
Rotate an array by 90 degrees in the plane specified by the given axes. The input must have at least 2 dimensions.
Returns:
NDArray — The rotated array.
roll
Roll array elements along a given axis. Elements that roll past the last position wrap around to the first.
Returns:
NDArray — Array with elements rolled.
delete_
Remove elements from an array along an axis. Returns a new array (copy). Exported as bothdelete_ and delete.
Returns:
NDArray — A copy of a with the specified elements removed.
atleast_1d
Convert inputs to arrays with at least 1 dimension. Scalar (0-D) inputs become 1-D arrays of length 1. Higher-dimensional inputs are returned unchanged.
Returns:
NDArray | NDArray[] — A single array if one input was given, or a list of arrays if multiple inputs were given. Each output has ndim >= 1.
atleast_2d
Convert inputs to arrays with at least 2 dimensions. 0-D inputs become(1, 1), 1-D inputs of length N become (1, N). Higher-dimensional inputs are returned unchanged.
Returns:
NDArray | NDArray[] — A single array if one input was given, or a list of arrays. Each output has ndim >= 2.
atleast_3d
Convert inputs to arrays with at least 3 dimensions. 0-D inputs become(1, 1, 1), 1-D inputs of length N become (1, N, 1), and 2-D inputs of shape (M, N) become (M, N, 1). Higher-dimensional inputs are returned unchanged.
Returns:
NDArray | NDArray[] — A single array if one input was given, or a list of arrays. Each output has ndim >= 3.