def units(self, val):
        """Override the units on the underlying variable."""
        if isinstance(val, units.Unit):
            self._unit = val
        else:
            self._unit = units(val)
def units ( self , val ) : if isinstance ( val , units . Unit ) : self . _unit = val else : self . _unit = units ( val )
Override the units on the underlying variable.