PartitionedDataSet#

class PartitionedDataSet(*args, **kwargs)[source]#

Wrapper for the vtkPartitionedDataSet class.

DataSet which composite dataset to encapsulates a dataset consisting of partitions.

Examples#

Download Python source code | Download Jupyter notebook

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

Attributes#

PartitionedDataSet.is_empty

Return True if there are no partitions.

PartitionedDataSet.n_partitions

Return the number of partitions.

Inherited Attributes#

DataObject.actual_memory_size

Return the actual size of the dataset object.

DataObject.field_data

Return FieldData as DataSetAttributes.

DataObject.memory_address

Get address of the underlying VTK C++ object.

DataObject.user_dict

Set or return a user-specified data dictionary.

Methods#

PartitionedDataSet.append(dataset)

Add a data set to the next partition index.

PartitionedDataSet.copy([deep])

Return a copy of the PartitionedDataSet.

PartitionedDataSet.copy_meta_from(ido, deep)

Copy pyvista meta data onto this object from another object.

PartitionedDataSet.get_data_range(name, ...)

Get the non-NaN min and max of a named array.

PartitionedDataSet.insert(index, dataset)

Insert data before index.

PartitionedDataSet.plot([off_screen, ...])

Plot a PyVista, NumPy, or VTK object.

PartitionedDataSet.pop([index])

Pop off a partition at the specified index are not supported.

PartitionedDataSet.wrap_nested()

Ensure that all nested data structures are wrapped as PyVista datasets.

Inherited Methods#

DataObject.add_field_data

Add field data.

DataObject.cast_to_multiblock

Convert this DataObject to a MultiBlock.

DataObject.clear_field_data

Remove all field data.

DataObject.copy_attributes

Copy the data attributes of the input dataset object.

DataObject.copy_structure

Copy the structure (geometry and topology) of the input dataset object.

DataObject.deep_copy

Overwrite this data object with another data object as a deep copy.

DataObject.head

Return the header stats of this dataset.

DataObject.save

Save this vtk object to file.

DataObject.shallow_copy

Shallow copy the given mesh to this mesh.