MultiBlock.n_points#
- property MultiBlock.n_points: int[source]#
Return the total number of points in all blocks.
Nested blocks are counted recursively and
Noneblocks count as zero.Added in version 0.50.
Examples#
Download Python source code | Download Jupyter notebook
>>> import pyvista as pv
>>> multi = pv.MultiBlock([pv.Sphere(), pv.MultiBlock([pv.Cube()]), None])
>>> multi.n_points
850
This is the sum over all leaf datasets.
>>> sum(block.n_points for block in multi.recursive_iterator(skip_none=True))
850