class_docstr: Algorithm to control active scalars.
  
  The output of this filter is a shallow copy of the input data
  set with the active scalars set as specified.
  
  Parameters
  ----------
  name : str
      Name of scalars used to set as active on the output mesh.
      Accepts a string name of an array that is present on the mesh.
      Array should be sized as a single vector.
  
  preference : str, default: 'point'
      When ``mesh.n_points == mesh.n_cells`` and setting
      scalars, this parameter sets how the scalars will be
      mapped to the mesh.  The default, ``'point'``, causes the
      scalars to be associated with the mesh points.  Can be
      either ``'point'`` or ``'cell'``.
docstr: Initialize algorithm.
code: def __init__(self, name: str, preference: str = "point"):
      """Initialize algorithm."""
      super().__init__()
      self.scalars_name = name
      self.preference = preference
  
imports: import traceback
  import numpy
  import pyvista
  from pyvista.core.errors import PyVistaPipelineError
  from pyvista.core.utilities.helpers import wrap
  from pyvista.plotting import _vtk
label_desc: Use image node_id 1 to create a new ActiveScalarsAlgorithm object from inherited base classes: PreserveTypeAlgorithmBase with example: obj = ActiveScalarsAlgorithm(name, preference)