MultiBlock.pop#
- MultiBlock.pop( ) MultiBlock | DataSet | None[source]#
Pop off a block at the specified index.
- Parameters:
- Returns:
- output
pyvista.DataSet|pyvista.MultiBlock Dataset from the given index that was removed.
- output
Examples#
Download Python source code | Download Jupyter notebook
Pop the "cube" multiblock.
>>> import pyvista as pv
>>> data = {
... 'cube': pv.Cube(),
... 'sphere': pv.Sphere(center=(2, 2, 0)),
... }
>>> blocks = pv.MultiBlock(data)
>>> blocks.keys()
['cube', 'sphere']
>>> cube = blocks.pop('cube')
>>> blocks.keys()
['sphere']