Commit 5a6ece03 authored by Christopher Bruns's avatar Christopher Bruns
Browse files

Add optimization to possibly speed up units code.

parent 05199afa
......@@ -93,7 +93,9 @@ def _unit_class_mul(self, other):
# print "scalar * unit"
value = other
unit = self
return Quantity(other, self).reduce_unit(self)
# Is reduce_unit needed here? I hope not, there is a performance issue...
# return Quantity(other, self).reduce_unit(self)
return Quantity(other, self)
Unit.__mul__ = _unit_class_mul
Unit.__rmul__ = Unit.__mul__
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment