def _dimension_changed(self, old, new): try: self.data.rescale(new) except: self.unit = None self.data = real(None, new) self._data_changed(old, self.data)
def _value_changed(self, old, new): self.data = real(new, self.data.units, self.data.get_uncertainty())