Skip to content

Commit

Permalink
Merge pull request #2832 from martinholmer/tmd-growfactors-handling
Browse files Browse the repository at this point in the history
Fix handling of tmd_growfactors.csv file
  • Loading branch information
martinholmer authored Nov 7, 2024
2 parents 95d55d4 + 4bdaef3 commit 81bf6b0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion taxcalc.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: taxcalc
Version: 4.3.0
Version: 4.3.1
Summary: taxcalc
Home-page: https://github.com/PSLmodels/Tax-Calculator
Download-URL: https://github.com/PSLmodels/Tax-Calculator
Expand Down
10 changes: 5 additions & 5 deletions taxcalc/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,8 @@ def mtr(self, variable_str='e00200p',
self.policy_param('FICA_ss_trt_employee') +
self.policy_param('FICA_mc_trt_employer') +
self.policy_param('FICA_mc_trt_employee')),
0.5 * (self.policy_param('FICA_mc_trt_employer') + self.policy_param('FICA_mc_trt_employee')))
0.5 * (self.policy_param('FICA_mc_trt_employer') +
self.policy_param('FICA_mc_trt_employee')))
else:
adj = 0.0
# compute marginal tax rates
Expand Down Expand Up @@ -1189,11 +1190,10 @@ 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)
is_array = isinstance(upda_value, np.ndarray)
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_array and not np.allclose(upda_value, base_value))
or (is_array == False and upda_value != base_value)
):
params_with_diff.append(pname)
if params_with_diff:
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/growfactors.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class instance: GrowFactors
which is for use with puf and cps data from the taxdata repository.
"""

PACKAGE_FILE_NAMES = ['growfactors.csv', 'tmd_growfactors.csv']
PACKAGE_FILE_NAMES = ['growfactors.csv']
FILE_PATH = os.path.abspath(os.path.dirname(__file__))

VALID_NAMES = set(['ABOOK', 'ACGNS', 'ACPIM', 'ACPIU',
Expand Down

0 comments on commit 81bf6b0

Please sign in to comment.