>>> import numpy as np
>>> a = np.array([1, 2, 3, 4, 5, 6, 7, 8])
>>> np.flip(a)
array([8, 7, 6, 5, 4, 3, 2, 1])
>>> b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]])
>>> b
array([[ 1, 2, 3, 4],
[ 5, 6, 7, 8],
[ 9, 10, 11, 12]])
>>> np.flip(b)
array([[12, 11, 10, 9],
[ 8, 7, 6, 5],
[ 4, 3, 2, 1]])
>>> np.flip(b,axis=0)
array([[ 9, 10, 11, 12],
[ 5, 6, 7, 8],
[ 1, 2, 3, 4]])
>>> np.flip(b,axis=1)
array([[ 4, 3, 2, 1],
[ 8, 7, 6, 5],
[12, 11, 10, 9]])