From fd25ef40eaaedde075b7906a612120f395c7489b Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Mon, 10 Sep 2018 07:34:35 +1000 Subject: [PATCH] Update calls to deprecated __getitem__() method --- scaling/froude.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scaling/froude.py b/scaling/froude.py index 456f9bb..b1b3fec 100644 --- a/scaling/froude.py +++ b/scaling/froude.py @@ -7,8 +7,8 @@ def _convert(x, length_scale_factor, from_unit, to_unit): ureg = pint.UnitRegistry() # Calculate unit conversion factor - from_unit = ureg[from_unit] - to_unit = ureg[to_unit] + from_unit = ureg(from_unit) + to_unit = ureg(to_unit) unit_conversion_factor = (1 * from_unit).to(to_unit).magnitude # Define Froude scaling relationships