cf.Partition.close

Partition.close(save=False)[source]

Close the partition after it has been conformed.

Closing the partition is important for memory management. The partition should always be closed after it is conformed 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 parameter:

  • 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_dimension_names

Next topic

cf.Partition.copy

This Page