@@ -189,7 +189,7 @@ def _parse_exogenous_processes(optim_paras, params):
189189 names = _parse_observable_or_exog_process_names (params , "exogenous_process" )
190190
191191 for exog_proc in names :
192- regex_pattern = fr "\bexogenous_process_{ exog_proc } _([0-9a-z_]+)\b"
192+ regex_pattern = rf "\bexogenous_process_{ exog_proc } _([0-9a-z_]+)\b"
193193 parsed_parameters = _parse_probabilities_or_logit_coefficients (
194194 params , regex_pattern
195195 )
@@ -205,7 +205,7 @@ def _parse_observables(optim_paras, params):
205205 names = _parse_observable_or_exog_process_names (params , "observable" )
206206
207207 for observable in names :
208- regex_pattern = fr "\bobservable_{ observable } _([0-9a-z_]+)\b"
208+ regex_pattern = rf "\bobservable_{ observable } _([0-9a-z_]+)\b"
209209 parsed_parameters = _parse_probabilities_or_logit_coefficients (
210210 params , regex_pattern
211211 )
@@ -286,7 +286,7 @@ def _parse_choice_parameters(optim_paras, params):
286286def _parse_initial_and_max_experience (optim_paras , params , options ):
287287 """Process initial experience distributions and maximum experience."""
288288 for choice in optim_paras ["choices_w_exp" ]:
289- regex_for_levels = fr "\binitial_exp_{ choice } _([0-9]+)\b"
289+ regex_for_levels = rf "\binitial_exp_{ choice } _([0-9]+)\b"
290290 parsed_parameters = _parse_probabilities_or_logit_coefficients (
291291 params , regex_for_levels
292292 )
@@ -470,7 +470,7 @@ def _infer_choices_with_prefix(params, prefix):
470470 """
471471 return sorted (
472472 params .index .get_level_values (0 )
473- .str .extract (fr "\b{ prefix } _([A-Za-z_]+)\b" , expand = False )
473+ .str .extract (rf "\b{ prefix } _([A-Za-z_]+)\b" , expand = False )
474474 .dropna ()
475475 .unique ()
476476 )
@@ -544,7 +544,7 @@ def _parse_lagged_choices(optim_paras, options, params):
544544 # Add existing lagged choice parameters to ``optim_paras``.
545545 for lag in range (1 , n_lc_covariates + 1 ):
546546 parsed_parameters = _parse_probabilities_or_logit_coefficients (
547- params , fr "lagged_choice_{ lag } _([A-Za-z_]+)"
547+ params , rf "lagged_choice_{ lag } _([A-Za-z_]+)"
548548 )
549549
550550 # If there are no parameters for the specific lag, assume equiprobable choices.
0 commit comments