Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of tmd_growfactors.csv file #2832

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading