class_docstr: PyVista wrapping of vtkCellArray.
  
  Provides convenience functions to simplify creating a CellArray from
  a numpy array or list.
  
  Parameters
  ----------
  cells : np.ndarray or list, optional
      Import an array of data with the legacy vtkCellArray layout, e.g.
      ``{ n0, p0_0, p0_1, ..., p0_n, n1, p1_0, p1_1, ..., p1_n, ... }``
      Where n0 is the number of points in cell 0, and pX_Y is the Y'th
      point in cell X.
  
  n_cells : int, optional
      The number of cells.
  
  deep : bool, default: False
      Perform a deep copy of the original cell.
  
  Examples
  --------
  Create a cell array containing two triangles from the traditional interleaved format
  
  >>> from pyvista.core.cell import CellArray
  >>> cellarr = CellArray([3, 0, 1, 2, 3, 3, 4, 5])
  
  Create a cell array containing two triangles from separate offsets and connectivity arrays
  
  >>> from pyvista.core.cell import CellArray
  >>> offsets = [0, 3, 6]
  >>> connectivity = [0, 1, 2, 3, 4, 5]
  >>> cellarr = CellArray.from_arrays(offsets, connectivity)
docstr: Construct a ``CellArray`` from a (n_cells, cell_size) array of cell indices.
  
  Parameters
  ----------
  cells : numpy.ndarray or list[list[int]]
      Cell array of shape (n_cells, cell_size) where all cells have the same size `cell_size`.
  
  deep : bool, default: False
      Whether to deep copy the cell array data into the vtk connectivity array.
  
  Returns
  -------
  pyvista.CellArray
      Constructed ``CellArray``.
docstr_tok: ["Construct","a","``","CellArray","``","from","a","(","n_cells",",","cell_size",")","array","of","cell","indices",".","Parameters","--","--","--","--","--","cells",":","numpy.ndarray","or","list","[","list","[","int","]","]","Cell","array","of","shape","(","n_cells",",","cell_size",")","where","all","cells","have","the","same","size","`","cell_size","`",".","deep",":","bool",",","default",":","False","Whether","to","deep","copy","the","cell","array","data","into","the","vtk","connectivity","array",".","Returns","--","--","--","-","pyvista.CellArray","Constructed","``","CellArray","``","."]
code: def from_regular_cells(
      cls, cells: Matrix[int], deep: bool = False
  ) -> pyvista.CellArray:
      """Construct a ``CellArray`` from a (n_cells, cell_size) array of cell indices.
  
      Parameters
      ----------
      cells : numpy.ndarray or list[list[int]]
          Cell array of shape (n_cells, cell_size) where all cells have the same size `cell_size`.
  
      deep : bool, default: False
          Whether to deep copy the cell array data into the vtk connectivity array.
  
      Returns
      -------
      pyvista.CellArray
          Constructed ``CellArray``.
      """
      cells = np.asarray(cells, dtype=pyvista.ID_TYPE)
      n_cells, cell_size = cells.shape
      offsets = cell_size * np.arange(
          n_cells + 1, dtype=pyvista.ID_TYPE
      )
      cellarr = cls()
      cellarr._set_data(offsets, cells, deep=deep)
      return cellarr
  
imports: from __future__ import annotations
  from typing import List, Optional, Sequence, Tuple, Union, cast
  import numpy
  import pyvista
  from .None import _vtk_core
  from ._typing_core import Matrix, NumpyArray, Vector
  from .celltype import CellType
  from .dataset import DataObject
  from .errors import CellSizeError
  from .utilities.cells import ncells_from_cells, numpy_to_idarr
label_desc: Use image node_id 10 for calling the CellArray obj's underlying member method code with example usage: obj.from_regular_cells(cls, cells, deep) and returns: cellarr