You can reverse an array in the NumPy with the following code. If you want to learn Python, I highly recommend reading This Book.

Method 1
import numpy as np a = np.array([1, 12, 3, 4, 15]) b = a[::-1] print(b)
Output
[15 4 3 12 1]
Method 2
import numpy as np a = np.array([1, 12, 3, 4, 15]) b = np.flipud(a) print(b)
Output
[15 4 3 12 1]