From 73a51f01cae11aceae1714608fab0162ce05a122 Mon Sep 17 00:00:00 2001 From: Sam Dareska <37879103+samwaseda@users.noreply.github.com> Date: Sat, 4 Jan 2025 17:22:54 +0200 Subject: [PATCH] Bugfix for `_replace_units` --- pint/registry_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pint/registry_helpers.py b/pint/registry_helpers.py index f2961cc74..f1973052e 100644 --- a/pint/registry_helpers.py +++ b/pint/registry_helpers.py @@ -43,7 +43,7 @@ def _replace_units(original_units, values_by_name): """ q = 1 for arg_name, exponent in original_units.items(): - q = q * values_by_name[arg_name] ** exponent + q = q * values_by_name[arg_name].units ** exponent return getattr(q, "_units", UnitsContainer({}))