pyvista.CellArray.from_regular_cells

pyvista.CellArray.from_regular_cells#

classmethod CellArray.from_regular_cells(
cells: MatrixLike[int],
deep: bool = False,
) pyvista.CellArray[source]#

Construct a CellArray from a (n_cells, cell_size) array of cell indices.

Parameters:
cellsnumpy.ndarray or list[list[int]]

Cell array of shape (n_cells, cell_size) where all cells have the same size cell_size.

deepbool, default: False

Whether to deep copy the cell array data into the vtk connectivity array.

Returns:
pyvista.CellArray

Constructed CellArray.