numpy.flip() in Python

The numpy.flip() function is used to reverse the order of elements in an array along the given axis where the shape of the array is preserved, but the elements are reordered.



m : This parameter represents the Input array.

axis : Axis or axes parameter is used to flip over the values. The default axis value is None, flip over all of the axes of the input array


This function returns a view of m with the entries of axis reversed.

Example 1


Pin It on Pinterest

Share This