sliceaxisix#
- pybrops.core.util.array.sliceaxisix(shape, axis)[source]#
Generate tuples containing indices for iteratively slicing a
numpy.ndarray
along a set of axes.- Parameters:
shape (tuple) – The shape of the
numpy.ndarray
.axis (tuple) – The axes along which to iterate.
- Yields:
out (tuple) – A tuple which can be used to slice an array.
- Return type:
Generator