NumPy - Indexing and Slicing
What is wrong with this code snippet?
What will
arr = np.array([1,2,3,4,5])
slice = arr[4:1:-1]What will
slice contain?arr = np.array([1,2,3,4,5])
slice = arr[4:1:-1]slice contain?step=-1, slicing goes backwards from start index 4 down to stop index 1 (exclusive).15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions