blosc2.NDArray.squeeze#

NDArray.squeeze() None#

Remove single-dimensional entries from the shape of the array.

This method modifies the array in-place, removing any dimensions with size 1.

Returns:

out

Return type:

None

Examples

>>> import blosc2
>>> shape = [1, 23, 1, 11, 1]
>>> # Create an array
>>> a = blosc2.full(shape, 2**30)
>>> a.shape
(1, 23, 1, 11, 1)
>>> # Squeeze the array
>>> a.squeeze()
>>> a.shape
(23, 11)