# cupy.flip¶

cupy.flip(a, axis=None)[source]

Reverse the order of elements in an array along the given axis.

Note that flip function has been introduced since NumPy v1.12. The contents of this document is the same as the original one.

Parameters
• a (ndarray) – Input array.

• axis (int or tuple of int or None) – Axis or axes along which to flip over. The default, axis=None, will flip over all of the axes of the input array. If axis is negative it counts from the last to the first axis. If axis is a tuple of ints, flipping is performed on all of the axes specified in the tuple.

Returns

Output array.

Return type

ndarray