You can reverse an array in the NumPy with the following code. If you want to learn Python, I highly recommend reading This Book.
![How to reverse an array in NumPy](https://aihints.com/wp-content/uploads/2022/05/How-to-reverse-an-array-in-NumPy.png)
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]