cf.PartitionMatrix.squeeze

PartitionMatrix.squeeze()[source]

Remove all size 1 partition dimensions in place.

Note that this does not change the master data array.

Returns :None

Examples

>>> pm.shape
(1, 2, 1, 2)
>>> pm.squeeze()
>>> pm.shape
(2, 2)
>>> pm.shape
(1,)
>>> pm.squeeze()
>>> pm.shape
()
>>> pm.squeeze()
>>> pm.shape
()

Previous topic

cf.PartitionMatrix.set_location_map

Next topic

cf.PartitionMatrix.swapaxes

This Page