Skip to content

Commit

Permalink
Merge pull request #26 from PSLmodels/mc_bug
Browse files Browse the repository at this point in the history
Fix bug in reading input data to Batch class
  • Loading branch information
Peter-Metz authored Mar 10, 2020
2 parents 38b9ce3 + 8e384fc commit ba942b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ channels:
- conda-forge
dependencies:
- python>=3.6.5
- taxcalc>=2.4.2
- taxcalc<2.8.0
- behresp>=0.9.0
- pandas>=0.23
- numpy>=1.13
- paramtools>=0.10.1
- ipython
- pytest
- dask
- bokeh
- bokeh<2.0.0
- markdown
- pip
- pip:
Expand Down
9 changes: 6 additions & 3 deletions taxcrunch/multi_cruncher.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def create_table(self, reform_file=None, be_sub=0, be_inc=0, be_cg=0):
"""
year = self.invar['FLPDYR'][0]
year = int(year.item())
recs = tc.Records(data=self.invar, start_year=year)
recs = tc.Records(data=self.invar, start_year=year,
gfactors=None, weights=None, adjust_ratios=None)

if reform_file == None:
pol = tc.Policy()
Expand Down Expand Up @@ -277,7 +278,8 @@ def calc_mtr(self, reform_file):
"""
year = self.invar['FLPDYR'][0]
year = int(year.item())
recs_base = tc.Records(data=self.invar, start_year=year)
recs_base = tc.Records(data=self.invar, start_year=year,
gfactors=None, weights=None, adjust_ratios=None)
if reform_file == None:
pol = tc.Policy()
else:
Expand All @@ -290,7 +292,8 @@ def calc_mtr(self, reform_file):
incometax_base = calc_base.array('iitax')
combined_taxes_base = incometax_base + payrolltax_base

recs_marg = tc.Records(data=self.invar_marg, start_year=year)
recs_marg = tc.Records(data=self.invar_marg, start_year=year,
gfactors=None, weights=None, adjust_ratios=None)
calc_marg = tc.Calculator(policy=pol, records=recs_marg)
calc_marg.advance_to_year(year)
calc_marg.calc_all()
Expand Down

0 comments on commit ba942b1

Please sign in to comment.