diff --git a/artiq/language/units.py b/artiq/language/units.py index 88451c402..cb912014e 100644 --- a/artiq/language/units.py +++ b/artiq/language/units.py @@ -117,6 +117,9 @@ class Quantity: else: return str(r_amount) + " " + self.unit + def __float__(self): + return float(self.amount) + # mul/div def _binop(self, other, opf_name, dim_function): opf = getattr(self.amount, opf_name)