Skip to content

Commit

Permalink
Merge pull request #846 from jdebacker/txfunc_fix
Browse files Browse the repository at this point in the history
Merging
  • Loading branch information
rickecon authored Jan 21, 2023
2 parents 1ac812b + b65cf01 commit 8b374ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 7 additions & 1 deletion ogcore/parameter_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,8 +1118,14 @@ def plot_2D_taxfunc(
# get tax rates for each point in the income support and plot
fig, ax = plt.subplots()
for i, tax_params in enumerate(tax_param_list):
if tax_func_type[i] == "mono":
tax_params = tax_params[rate_key][s][t][0]
else:
tax_param_array = np.array(tax_params[rate_key])
tax_params = tax_param_array[s, t, :]
rates = txfunc.get_tax_rates(
tax_params[rate_key][s, t, :],
# tax_params[rate_key][s, t, :],
tax_params,
X,
Y,
None,
Expand Down
7 changes: 3 additions & 4 deletions ogcore/txfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1183,10 +1183,9 @@ def tax_func_loop(
] = lin_int_mtry[s_ind, :]

elif (
NoData_cnt
> 0 & NoData_cnt
< s - s_min & tax_func_type
== "mono"
(NoData_cnt > 0)
& (NoData_cnt < s - s_min)
& (tax_func_type == "mono")
):
# '''
# -------------------------------------------------------------
Expand Down

0 comments on commit 8b374ce

Please sign in to comment.