flex_reshape¶
-
tollan.utils.np.
flex_reshape
(arr, shape, trim_option='end')[source]¶ Reshape an array with possible trimming of extraneous items.
- Parameters
- arr
numpy.ndarray
The array to reshape
- shapetuple
The new shape.
- trim_optionstr:
The way to trim the original shape, can be one of “start” or “end”.
- arr