code: def _add_cell_scalar(self, scalars, name, set_active=False, deep=True):
          
          if not isinstance(scalars, np.ndarray):
              raise TypeError('Input must be a numpy.ndarray')
  
          if scalars.shape[0] != self.n_cells:
              raise Exception('Number of scalars must match the number of cells (%d)'
                              % self.n_cells)
  
          if not scalars.flags.c_contiguous:
              raise AssertionError('Array must be contigious')
          if scalars.dtype == np.bool:
              scalars = scalars.view(np.uint8)
              self._cell_bool_array_names.append(name)
  
          vtkarr = numpy_to_vtk(scalars, deep=deep)
          vtkarr.SetName(name)
          self.GetCellData().AddArray(vtkarr)
          if set_active or self.active_scalar_info[1] is None:
              self.GetCellData().SetActiveScalars(name)
              self._active_scalar_info = [CELL_DATA_FIELD, name]
docs: Adds cell scalars to the vtk object.
  
          Parameters
          ----------
          scalars : numpy.ndarray
              Numpy array of scalars.  Must match number of points.
  
          name : str
              Name of point scalars to add.
  
          set_active : bool, optional
              Sets the scalars to the active plotting scalars.  Default False.
  
          deep : bool, optional
              Does not copy scalars when False.  A reference to the scalars
              must be kept to avoid a segfault.