class_docstr: A mixin class to map scalar data to RGBA.
  
  The ScalarMappable applies data normalization before returning RGBA colors
  from the given colormap.
docstr: Set the value array from array-like *A*.
  
  Parameters
  ----------
  A : array-like or None
      The values that are mapped to colors.
  
      The base class `.ScalarMappable` does not make any assumptions on
      the dimensionality and shape of the value array *A*.
docstr_tok: ["Set","the","value","array","from","array-like","*","A","*",".","Parameters","--","--","--","--","--","A",":","array-like","or","None","The","values","that","are","mapped","to","colors",".","The","base","class","`",".ScalarMappable","`","does","not","make","any","assumptions","on","the","dimensionality","and","shape","of","the","value","array","*","A","*","."]
code: def set_array(self, A):
      """
      Set the value array from array-like *A*.
  
      Parameters
      ----------
      A : array-like or None
          The values that are mapped to colors.
  
          The base class `.ScalarMappable` does not make any assumptions on
          the dimensionality and shape of the value array *A*.
      """
      if A is None:
          self._A = None
          return
  
      A = cbook.safe_masked_invalid(A, copy=True)
      if not np.can_cast(A.dtype, float, "same_kind"):
          raise TypeError(
              f"Image data of dtype {A.dtype} cannot be "
              "converted to float"
          )
  
      self._A = A
      if not self.norm.scaled():
          self.norm.autoscale_None(A)
  
imports: from collections.abc import Mapping
  import functools
  import numpy
  from numpy import ma
  import matplotlib
  from matplotlib import _api, colors, cbook, scale
  from matplotlib._cm import datad
  from matplotlib._cm_listed import cmaps
label_desc: Use image node_id 4 for calling the ScalarMappable obj's underlying member method code with example usage: obj.set_array(A) without return types