cf.CoordinateReference.del_coordinate¶
-
CoordinateReference.
del_coordinate
(key, default=ValueError())[source]¶ Remove a reference to a coordinate construct.
New in version 1.7.0.
See also
- Parameters
- key:
str
The construct key of the coordinate construct.
- Parameter example:
key='dimensioncoordinate1'
- Parameter example:
key='auxiliarycoordinate0'
- default: optional
Return the value of the default parameter if the coordinate construct has not been set. If set to an
Exception
instance then it will be raised instead.
- key:
- Returns
The removed coordinate construct key.
Examples:
>>> c.coordinates() {'dimensioncoordinate0', 'dimensioncoordinate1'} >>> c.del_coordinate('dimensioncoordinate0') 'dimensioncoordinate0' >>> c.coordinates() {'dimensioncoordinate1'} >>> c.del_coordinate('dimensioncoordinate0', 'not set') 'not set'