cfdm.core.Constructs.copy

Constructs.copy(data=True)[source]

Return a deep copy.

f.copy() is equivalent to copy.deepcopy(f).

New in version (cfdm): 1.7.0

Parameters
data: bool, optional

If True (the default) then copy data contained in the metadata construct(s), else the data is not copied.

Returns
Constructs

The deep copy.

Examples

>>> f = cfdm.core.example_field(0)
>>> c = f.constructs
>>> k = c.copy()
>>> k = c.copy(data=False)