@@ -275,18 +275,15 @@ def _template_macro_str(self):
275275 template_inputs .append (
276276 f"parameters=({ ', ' .join ([f'{ p } ={ self .parameters [p ]} ' for p in self .parameters ]) + ',' } )"
277277 )
278- return dedent (
279- f"""
278+ return dedent (f"""
280279 @template_spec({ ', ' .join (template_inputs ) + ',' } ) do { ', ' .join (self .variable_names )}
281280 { self .combine }
282281 end
283- """
284- )
282+ """ )
285283
286284 def julia_expression_options (self ):
287285 f_combine = jl .seval (self .combine )
288- creator = jl .seval (
289- """
286+ creator = jl .seval ("""
290287 function _pysr_create_template_structure(
291288 @nospecialize(function_symbols::AbstractVector),
292289 @nospecialize(combine::Function),
@@ -301,8 +298,7 @@ def julia_expression_options(self):
301298 structure = SymbolicRegression.TemplateStructure{tuple_symbol}(combine, num_features)
302299 return (; structure)
303300 end
304- """
305- )
301+ """ )
306302 return creator (self .function_symbols , f_combine , self .num_features )
307303
308304 @property
@@ -327,8 +323,7 @@ def parametric_expression_deprecation_warning(
327323):
328324 function_name = "f"
329325 var_names = list (variable_names )
330- message = dedent (
331- f"""
326+ message = dedent (f"""
332327 ParametricExpressionSpec is deprecated. you should switch to TemplateExpressionSpec with explicit parameters indexed by category.
333328
334329 Since you have `max_parameters={ max_parameters } ` and `variable_names=[{ ", " .join (f'"{ v } "' for v in var_names )} ]`, you could migrate like this:
@@ -343,8 +338,7 @@ def parametric_expression_deprecation_warning(
343338 X = np.column_stack([X, category]) # add the category column
344339
345340 Finally, do not pass `category` when calling .fit().
346- """
347- ).strip ()
341+ """ ).strip ()
348342 wrapped = "\n " .join (textwrap .fill (line , 88 ) for line in message .splitlines ())
349343 warnings .warn (wrapped , FutureWarning , stacklevel = 3 )
350344
@@ -416,7 +410,7 @@ def _search_output_to_callable_expressions(
416410 equations : pd .DataFrame , search_output , i : int | None
417411) -> pd .DataFrame :
418412 equations = copy .deepcopy (equations )
419- ( _ , all_out_hof ) = search_output
413+ _ , all_out_hof = search_output
420414 out_hof = all_out_hof [i ] if i is not None else all_out_hof
421415 expressions = []
422416 callables = []
0 commit comments