Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 31, 2022
1 parent 35bb92c commit c641dc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion respy/conditional_draws.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def update_mean_and_evaluate_likelihood(
invariant
- log_wage_observed
- np.log(sigma)
- shock ** 2 / (2 * sigma_squared)
- shock**2 / (2 * sigma_squared)
)
else:
for i in range(n_choices):
Expand Down
10 changes: 5 additions & 5 deletions respy/pre_processing/model_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def _parse_exogenous_processes(optim_paras, params):
names = _parse_observable_or_exog_process_names(params, "exogenous_process")

for exog_proc in names:
regex_pattern = fr"\bexogenous_process_{exog_proc}_([0-9a-z_]+)\b"
regex_pattern = rf"\bexogenous_process_{exog_proc}_([0-9a-z_]+)\b"
parsed_parameters = _parse_probabilities_or_logit_coefficients(
params, regex_pattern
)
Expand All @@ -205,7 +205,7 @@ def _parse_observables(optim_paras, params):
names = _parse_observable_or_exog_process_names(params, "observable")

for observable in names:
regex_pattern = fr"\bobservable_{observable}_([0-9a-z_]+)\b"
regex_pattern = rf"\bobservable_{observable}_([0-9a-z_]+)\b"
parsed_parameters = _parse_probabilities_or_logit_coefficients(
params, regex_pattern
)
Expand Down Expand Up @@ -286,7 +286,7 @@ def _parse_choice_parameters(optim_paras, params):
def _parse_initial_and_max_experience(optim_paras, params, options):
"""Process initial experience distributions and maximum experience."""
for choice in optim_paras["choices_w_exp"]:
regex_for_levels = fr"\binitial_exp_{choice}_([0-9]+)\b"
regex_for_levels = rf"\binitial_exp_{choice}_([0-9]+)\b"
parsed_parameters = _parse_probabilities_or_logit_coefficients(
params, regex_for_levels
)
Expand Down Expand Up @@ -470,7 +470,7 @@ def _infer_choices_with_prefix(params, prefix):
"""
return sorted(
params.index.get_level_values(0)
.str.extract(fr"\b{prefix}_([A-Za-z_]+)\b", expand=False)
.str.extract(rf"\b{prefix}_([A-Za-z_]+)\b", expand=False)
.dropna()
.unique()
)
Expand Down Expand Up @@ -544,7 +544,7 @@ def _parse_lagged_choices(optim_paras, options, params):
# Add existing lagged choice parameters to ``optim_paras``.
for lag in range(1, n_lc_covariates + 1):
parsed_parameters = _parse_probabilities_or_logit_coefficients(
params, fr"lagged_choice_{lag}_([A-Za-z_]+)"
params, rf"lagged_choice_{lag}_([A-Za-z_]+)"
)

# If there are no parameters for the specific lag, assume equiprobable choices.
Expand Down

0 comments on commit c641dc2

Please sign in to comment.