fields.buffers.base.BufferBase.squeeze#
- BufferBase.squeeze(*args, axis=None, **kwargs) BufferBase [source]#
Remove axes of length one from self.
- Parameters:
axis (
None
orint
ortuple
ofints
, optional) – Selects a subset of the entries of length one in the shape. If an axis is selected with shape entry greater than one, an error is raised.*args – Additional positional arguments forwarded to from_array.
**kwargs – Additional keyword arguments forwarded to from_array.
- Returns:
The input buffer, but with all or a subset of the dimensions of length 1 removed. This is always self itself or a view into self. Note that if all axes are squeezed, the result is a 0d array and not a scalar.
- Return type: