code: def setValues(self, values):
          
          if isinstance(values, (list, set)):
              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))
              elif all(isinstance(value, tuple) for value in values):
                  self._impl.setValues(Utils.toTupleArray(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: Set the tuples in this set. Valid only for non-indexed sets.
  
          Args:
              values: A list of tuples or a :class:`~amplpy.DataFrame`.
  
          In the case of a :class:`~amplpy.DataFrame`, the number of indexing
          columns of the must be equal to the arity of the set. In the case of
          a list of tuples, the arity of each tuple must be equal to the arity
          of the set.
  
          For example, considering the following AMPL entities and corresponding
          Python objects:
  
          .. code-block:: ampl
  
              set A := 1..2;
              param p{i in A} := i+10;
              set AA;
  
          The following is valid:
  
          .. code-block:: python
  
              A, AA = ampl.getSet('A'), ampl.getSet('AA')
              AA.setValues(A.getValues())  # AA has now the members {1, 2}