diff --git a/pyciemss/interfaces.py b/pyciemss/interfaces.py index f5508dc1..779e717e 100644 --- a/pyciemss/interfaces.py +++ b/pyciemss/interfaces.py @@ -791,7 +791,7 @@ def optimize( maxfeval: int = 25, verbose: bool = False, roundup_decimal: int = 4, - progress_hook: Callable[[np.array, float, bool], bool] = lambda x, f, accept: False, + progress_hook: Callable[[arr: Any, float, bool], bool] = lambda x, f, accept: False, ) -> Dict[str, Any]: r""" Load a model from a file, compile it into a probabilistic program, and optimize under uncertainty with risk-based @@ -856,7 +856,7 @@ def optimize( - Whether to print out the optimization under uncertainty progress. roundup_decimal: int - Number of significant digits for the optimal policy. - progress_hook: Callable[[np.array, float, bool], bool], + progress_hook: Callable[[arr: Any, float, bool], bool], - A callback function that takes in the current coordinate(s) as an np.array, the minimal function evaluation at the coordinate(s), and whether or not that minimal value was accepted. When the function returns True, the basinhopping routine will stop. - This can be used to implement custom progress bars and/or early stopping criteria. diff --git a/pyciemss/ouu/ouu.py b/pyciemss/ouu/ouu.py index 2390b67f..bf9770b7 100644 --- a/pyciemss/ouu/ouu.py +++ b/pyciemss/ouu/ouu.py @@ -186,7 +186,7 @@ def __init__( maxiter: int = 100, u_bounds: np.ndarray = np.atleast_2d([[0], [1]]), progress_hook: Callable[ - [np.array, float, bool], bool + [arr: Any, float, bool], bool ] = lambda x, f, accept: False, ): self.x0 = np.squeeze(np.array([x0]))