Skip to content

Commit

Permalink
Fix bug introduced in PR PSLmodels#2401: Use ParamTools
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholmer committed Nov 7, 2024
1 parent 9f5bc41 commit 73b0aee
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions taxcalc/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 73b0aee

Please sign in to comment.