Skip to content

Commit 062b6cd

Browse files
committed
Re-introduced and deprecated static class method for lambda range computation
Signed-off-by: Nicola Vigano <nicola.vigano@cea.fr>
1 parent 0e7913d commit 062b6cd

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

src/corrct/param_tuning.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,27 @@ def solver_calling_function(self, exec_fun: Callable[[Any], tuple[NDArrayFloat,
724724
warn("DEPRECATED: This property is deprecated, and will be removed. Please use the property `task_exec_function`")
725725
self.task_exec_function = exec_fun
726726

727+
@staticmethod
728+
def get_lambda_range(start: float, end: float, num_per_order: int = 4) -> NDArrayFloat:
729+
"""Compute regularization weights within an interval.
730+
731+
Parameters
732+
----------
733+
start : float
734+
First regularization weight.
735+
end : float
736+
Last regularization weight.
737+
num_per_order : int, optional
738+
Number of steps per order of magnitude. The default is 4.
739+
740+
Returns
741+
-------
742+
NDArrayFloat
743+
List of regularization weights.
744+
"""
745+
warn("DEPRECATED: This method is deprecated, and will be removed. Please use the module function with the same name")
746+
return get_lambda_range(start=start, end=end, num_per_order=num_per_order)
747+
727748
def process_hp_vals(
728749
self,
729750
hp_vals: float | Sequence[float] | NDArrayFloat,

0 commit comments

Comments
 (0)