From 73b0aee5ee3adadda5b9ae47eace4d8e6ef92659 Mon Sep 17 00:00:00 2001 From: "martin.holmer@gmail.com" Date: Thu, 7 Nov 2024 14:48:28 -0500 Subject: [PATCH] Fix bug introduced in PR #2401: Use ParamTools --- taxcalc/calculator.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/taxcalc/calculator.py b/taxcalc/calculator.py index af2abbd84..014ae2369 100644 --- a/taxcalc/calculator.py +++ b/taxcalc/calculator.py @@ -1189,12 +1189,14 @@ def lines(text, num_indent_spaces, max_line_length=77): for pname in baseline.keys(): upda_value = getattr(updated, pname) base_value = getattr(baseline, pname) - if ( - (isinstance(upda_value, np.ndarray) and - np.allclose(upda_value, base_value)) or - (not isinstance(upda_value, np.ndarray) and - upda_value != base_value) - ): + is_diff = False + if isinstance(upda_value, np.ndarray): + if not np.allclose(upda_value, base_value): + is_diff = True + else: + if upda_value != base_value: + is_diff = True + if is_diff: params_with_diff.append(pname) if params_with_diff: mdata_base = baseline.specification(meta_data=True)