view_shape#
- glue.utils.array.view_shape(shape, view)#
Return the shape of a view of an array.
Returns equivalent of
np.zeros(shape)[view].shapebut with minimal memory usage.- Parameters:
- shapetuple
The shape of the array
- viewslice
A valid index into a Numpy array, or None