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.dimensions
['dim0', 'dim1', 'dim2']
>>> pm._list
[[[<cf.partition.Partition object at 0x145daa0>,
   <cf.partition.Partition object at 0x145db90>]],
 [[<cf.partition.Partition object at 0x145dc08>,
   <cf.partition.Partition object at 0x145dd70>]]]
>>> pm.squeeze()
>>> pm.dimensions
['dim0', 'dim2']
>>> pm._list
[[<cf.partition.Partition object at 0x145daa0>,
  <cf.partition.Partition object at 0x145db90>],
 [<cf.partition.Partition object at 0x145dc08>,
  <cf.partition.Partition object at 0x145dd70>]]

Previous topic

cf.PartitionMatrix.set_location_map

Next topic

cf.PartitionMatrix.transpose

This Page