valid_array_len#

property DataSetAttributes.valid_array_len: Optional[int]#

Return the length data should be when added to the dataset.

If there are no restrictions, returns None.

Examples

Show that valid array lengths match the number of points and cells for point and cell arrays, and there is no length limit for field data.

>>> import pyvista
>>> mesh = pyvista.Cube()
>>> mesh.n_points, mesh.n_cells
(8, 6)
>>> mesh.point_data.valid_array_len
8
>>> mesh.cell_data.valid_array_len
6
>>> mesh.field_data.valid_array_len is None
True