Right now I'm using a tuple with start and end index:
ind_range = (34,98)
but what I want is:
ind_range = (34:98)
so I can pass this directly to the array:
Original question answered: use
Ultimately, what I'm trying to do is index another array with a list of index ranges.
output: [[values from range1],[values from range2]]
When I do this I get the error:
IndexError: arrays used as indices must be of integer (or boolean) type
Correct answer: use a
slice object in combination with a list comprehension.