From 2c36ff7a9dd2af93d087e8744bdabff69a796df4 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Mon, 10 Sep 2018 07:41:15 +1000 Subject: [PATCH] Simplify pint unit conversion --- scaling/froude.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scaling/froude.py b/scaling/froude.py index b1b3fec..6d17682 100644 --- a/scaling/froude.py +++ b/scaling/froude.py @@ -9,7 +9,7 @@ def _convert(x, length_scale_factor, from_unit, to_unit): # Calculate unit conversion factor from_unit = ureg(from_unit) to_unit = ureg(to_unit) - unit_conversion_factor = (1 * from_unit).to(to_unit).magnitude + unit_conversion_factor = from_unit.to(to_unit).magnitude # Define Froude scaling relationships froude_l_exponent = 1