cf.PartitionMatrix.expand_dims

PartitionMatrix.expand_dims(pdim)[source]

Insert a new size 1 partition dimension in place.

The new partition dimension is inserted at position 0, i.e. it becomes the new slowest varying dimension.

Parameters :
pdim : str

The name of the new partition dimension.

Returns :

None

Examples

>>> pm.dimensions
['dim0', 'dim1']
>>> pm.expand_dims('dim2')
>>> pm.dimensions
['dim2', 'dim0', 'dim1']

Previous topic

cf.PartitionMatrix.copy

Next topic

cf.PartitionMatrix.ndenumerate

This Page