From dbe69cc214427d2e015cd9b17b1d89d840c55ab1 Mon Sep 17 00:00:00 2001 From: David Kaplan Date: Sat, 26 Aug 2023 18:50:11 -0500 Subject: [PATCH] fixed .value for pairParameters --- CHANGELOG-unreleased.md | 1 + src/pint/models/parameter.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG-unreleased.md b/CHANGELOG-unreleased.md index d7206cbe3..380a8b3c4 100644 --- a/CHANGELOG-unreleased.md +++ b/CHANGELOG-unreleased.md @@ -12,4 +12,5 @@ the released changes. ### Added ### Fixed - Fixed RTD by specifying theme explicitly. +- `.value()` now works for pairParameters ### Removed diff --git a/src/pint/models/parameter.py b/src/pint/models/parameter.py index 8a14e0106..016687563 100644 --- a/src/pint/models/parameter.py +++ b/src/pint/models/parameter.py @@ -776,6 +776,9 @@ def _get_value(self, quan): return None elif isinstance(quan, (float, np.longdouble)): return quan + elif isinstance(quan, list): + # for pairParamters + return [x.to(self.units).value for x in quan] else: return quan.to(self.units).value