code: def _value(obj):
      
      # TODO: this is ugly and makes everything ugly
      # can we handle this with a clean decorator or just requiring that only floats be passed??
      if hasattr(obj, 'value'):
          return obj.value
      elif isinstance(obj, np.ndarray):
          return np.array([o.value for o in obj])
      elif hasattr(obj, '__iter__'):
          return [_value(o) for o in obj]
      return obj
docs: make sure to get a float