I found a very similar question to mine, but not exactly the same. This one: here However in ntimes\'s case the size of the array matches the number of the dimensions the tu
Since you're using numpy
:
big_array[tup+(3,2)]
should work. When you call __getitem__
(via the square brackets), the stuff is passed to __getitem__
as a tuple. You just need to construct the tuple
explicitly here (adding tuples together concatenates into a new tuple) and numpy
will do what you want.