In this example we will show how to access the NumPy array element using the array indexing in Python.
Source Code
import numpy as np
n = np.array([1, 2, 3, 4, 5, 6])
print('The first element is:', n[0])
print('The fourth element is:', n[3])
print(n[0] + n[3])
Output:
The first element is: 1
The fourth element is: 4
5