pyvista.PartitionedDataSet.copy

pyvista.PartitionedDataSet.copy#

PartitionedDataSet.copy(deep=True)[source]#

Return a copy of the PartitionedDataSet.

Parameters:
deepbool, default: True

When True, make a full copy of the object.

Returns:
pyvista.PartitionedDataSet

Deep or shallow copy of the PartitionedDataSet.

Examples

>>> import pyvista as pv
>>> data = [
...     pv.Sphere(center=(2, 0, 0)),
...     pv.Cube(center=(0, 2, 0)),
...     pv.Cone(),
... ]
>>> partitions = pv.PartitionedDataSet(data)
>>> new_partitions = partitions.copy()
>>> len(new_partitions)
3