code: def setValues(self, values):
          
          if isinstance(values, dict):
              indices, values = list(zip(*values.items()))
              indices = Utils.toTupleArray(indices)
              if any(isinstance(value, basestring) for value in values):
                  values = list(map(str, values))
                  self._impl.setValuesTaStr(indices, values, len(values))
              elif all(isinstance(value, Real) for value in values):
                  values = list(map(float, values))
                  self._impl.setValuesTaDbl(indices, values, len(values))
              else:
                  raise TypeError
          elif isinstance(values, (list, tuple)):
              if any(isinstance(value, basestring) for value in values):
                  values = list(map(str, values))
                  self._impl.setValuesStr(values, len(values))
              elif all(isinstance(value, Real) for value in values):
                  values = list(map(float, values))
                  self._impl.setValuesDbl(values, len(values))
              else:
                  raise TypeError
          else:
              if np is not None and isinstance(values, np.ndarray):
                  self.setValues(DataFrame.fromNumpy(values).toList())
                  return
              Entity.setValues(self, values)
docs: Assign the values (string or float) to the parameter instances with the
          specified indices, equivalent to the AMPL code:
  
          .. code-block:: ampl
  
              let {i in indices} par[i] := values[i];
  
          Args:
              values: list, dictionary or :class:`~amplpy.DataFrame` with the
              indices and the values to be set.
  
          Raises:
              TypeError: If called on a scalar parameter.