MultiBlock.inferred_type#
- property MultiBlock.inferred_type: str[source]#
Return the generic type of this composite inferred from its blocks.
Nested blocks of the same class at the same depth are described together, so every
MultiBlockat one level shares a singleMultiBlock[...]. A composite without blocks is a bareMultiBlock.Added in version 0.50.
Examples#
Download Python source code | Download Jupyter notebook
>>> import pyvista as pv
>>> multi = pv.MultiBlock([pv.Sphere(), pv.Cube()])
>>> multi.inferred_type
'MultiBlock[PolyData]'
Nested and empty blocks are included.
>>> nested = pv.MultiBlock([multi, pv.ImageData(), None])
>>> nested.inferred_type
'MultiBlock[ImageData | MultiBlock[PolyData] | None]'