def get_val_wrapper(self, value, index=None):
     """Return a UnitsAttrWrapper object.  Its value attribute
     will be filled in by the caller.
     """
     if index is not None:
         raise ValueError("UncertainDistVar does not support indexing")
     # pylint: disable-msg=E1101
     if self.units is None:
         return value
     return UnitsAttrWrapper(value, units=self.units)
Beispiel #2
0
 def get_val_wrapper(self, value, index=None):
     """Return a UnitsAttrWrapper object.  Its value attribute
     will be filled in by the caller.
     """
     # pylint: disable=E1101
     if index is not None:
         value = get_indexed_value(value, None, index)
     if self.units:
         return UnitsAttrWrapper(value, units=self.units)
     else:
         return value