cfdm.core.CoordinateReference.clear_coordinates

CoordinateReference.clear_coordinates()[source]

Remove all references to coordinate constructs.

New in version (cfdm): 1.7.0

Returns
set

The removed coordinate construct keys.

Examples

>>> r = cfdm.core.CoordinateReference()
>>> r.set_coordinates(['dimensioncoordinate0', 'auxiliarycoordinate1'])
>>> sorted(r.coordinates())
['auxiliarycoordinate1', 'dimensioncoordinate0']
>>> sorted(r.clear_coordinates())
['auxiliarycoordinate1', 'dimensioncoordinate0']
>>> r.coordinates()
set()