blosc2.NDArray.squeeze#

NDArray.squeeze()#

Remove the 1’s in array’s shape.

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)