diff --git a/becquerel/core/spectrum.py b/becquerel/core/spectrum.py index 1e1181ff..8e088109 100644 --- a/becquerel/core/spectrum.py +++ b/becquerel/core/spectrum.py @@ -942,7 +942,7 @@ def __mul__(self, other): # This line adds the right multiplication __rmul__ = __mul__ - def __div__(self, other): + def __truediv__(self, other): """Return a new Spectrum object with counts (or CPS) scaled down. Args: @@ -958,9 +958,6 @@ def __div__(self, other): return self._mul_div(other, div=True) - # This line adds true division - __truediv__ = __div__ - def _mul_div(self, scaling_factor: float, div=False): """Multiply or divide a spectrum by a scalar. Handle errors. diff --git a/becquerel/tools/isotope_qty.py b/becquerel/tools/isotope_qty.py index 24be1575..fd9efa86 100644 --- a/becquerel/tools/isotope_qty.py +++ b/becquerel/tools/isotope_qty.py @@ -512,13 +512,8 @@ def __mul__(self, other): return self._mul_div(other, div=False) - def __div__(self, other): - """Divide the quantity""" - - return self._mul_div(other, div=True) - def __truediv__(self, other): - """Divide the quantity (python 3)""" + """Divide the quantity""" return self._mul_div(other, div=True)