NumPy - Indexing and Slicing
What is the output of the following code?
import numpy as np arr = np.array([10, 20, 30, 40, 50]) print(arr[1:4])
import numpy as np arr = np.array([10, 20, 30, 40, 50]) print(arr[1:4])
arr[1:4] selects elements from index 1 up to but not including 4.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions