pyvista.MultiBlock.extend#

MultiBlock.extend(datasets: Iterable[_TypeMultiBlockLeaf]) None[source]#

Extend MultiBlock with an Iterable.

If another MultiBlock object is supplied, the key names will be preserved.

Parameters:
datasetsIterable[pyvista.DataSet or pyvista.MultiBlock]

Datasets to extend.

Examples

>>> import pyvista as pv
>>> from pyvista import examples
>>> data = {
...     "cube": pv.Cube(),
...     "sphere": pv.Sphere(center=(2, 2, 0)),
... }
>>> blocks = pv.MultiBlock(data)
>>> blocks_uniform = pv.MultiBlock(
...     {"uniform": examples.load_uniform()}
... )
>>> blocks.extend(blocks_uniform)
>>> len(blocks)
3
>>> blocks.keys()
['cube', 'sphere', 'uniform']