NumPy - Indexing and Slicing
Which of the following is the correct syntax to slice a NumPy array
arr to get every 3rd element from index 1 to 10?arr to get every 3rd element from index 1 to 10?arr[start:stop:step]. Here, start=1, stop=10, step=3 means from index 1 up to 9, every 3rd element.arr[1:10:3] matches the correct order and values. Others have wrong order or values that don't match the requirement.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions