cf.Partition.close

Partition.close(save=False)[source]

Close the partition after it has been conformed.

The partition should usually be closed after its dataarray method has been called to prevent memory leaks.

Closing the partition does one of the following, depending on the values of the partition’s _original and _save attributes and on the save argument:

  • Nothing.
  • Stores the partition’s data array in a temporary file.
  • Reverts the entire partition to a previous state.
Parameters :
save : bool, optional

If True and the partition is not to be reverted to a previous state then force its data array to be stored in a temporary file.

Returns :

None

Examples

>>> p.dataarray(...)
>>> p.close()

Previous topic

cf.Partition.change_axis_names

Next topic

cf.Partition.copy

This Page