I know how to do this if I know the number of dimensions of the array when coding. I have seen Select 'area' from a 2D array in python
I am trying to figure out how to extract a "volume" from an any dimensional array.
I know how to slice arrays. a[0: 10]
I know how to use that.
What I essentially want is a [lower_bound: higher_bound]
. But the bounds are arrays that specify the locations in each dimension.