Translate a requested region into a slice

A measurement array a has shape (7, 8). You need rows with indices 1, 2, 3, and 4, and columns with indices 0, 3, and 6. Complete the parameter values for the following selection, using positive integers.


Python
selected = a[1:row_stop, 0:8:column_step]


The value of row_stop is , and the value of column_step is .

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More NumPy Questions: