clean

MultiBlock.clean(empty=True)

Remove any null blocks in place.

Parameters
emptybool

Remove any meshes that are empty as well (have zero points).

Examples

>>> import pyvista as pv
>>> data = {"cube": pv.Cube(), "empty": pv.PolyData()}
>>> blocks = pv.MultiBlock(data)
>>> blocks.clean(empty=True)
>>> blocks.keys()
['cube']