copy#
- DataObject.copy(deep=True)[source]#
Return a copy of the object.
- Parameters:
- deepbool,
optional
When
True
makes a full copy of the object. WhenFalse
, performs a shallow copy where the points, cell, and data arrays are references to the original object.
- deepbool,
- Returns:
pyvista.DataSet
Deep or shallow copy of the input. Type is identical to the input.
Examples
Create and make a deep copy of a PolyData object.
>>> import pyvista >>> mesh_a = pyvista.Sphere() >>> mesh_b = mesh_a.copy() >>> mesh_a == mesh_b True