Lesson 8 of 60
pythonIndexing, Slicing, and Iterating in NumPy
20 minutes
Course progress13%
Indexing, Slicing, and Iterating
NumPy provides powerful ways to access sub‑arrays.
1‑D indexing
arr = np.arange(10)
print(arr[3]) # 3
print(arr[-1]) # 9