cf.Domain.remove_cell_measure

Domain.remove_cell_measure(key)[source]

Remove a cell measure from the domain in place, preserving internal consistency.

Note that this will never remove a dimension from the domain.

Parameters :
key : str

The identifier of the cell measure to be removed.

Returns :
out : cf.CellMeasure

The removed cell measure

Examples

>>> d.dimension_sizes
{'dim0': 73, 'dim1': 96, 'dim2': 1}
>>> d.dimensions
{'dim0': ['dim0'],
 'dim1': ['dim1'],
 'cm0' : ['dim1', 'dim0'],
 'data': ['dim2', 'dim0, 'dim1']}
>>> d.remove_cell_measure('cm0')
>>> d.dimension_sizes
{'dim0': 73, 'dim1': 96, 'dim2': 1}}
>>> d.dimensions
{'dim0': ['dim0'],
 'dim1': ['dim1'],
 'data': ['dim2', 'dim0, 'dim1']}

Previous topic

cf.Domain.popitem

Next topic

cf.Domain.remove_coordinate

This Page