Skip to content

Commit

Permalink
fixing typing on array
Browse files Browse the repository at this point in the history
  • Loading branch information
sabinala committed Jul 23, 2024
1 parent d4e5602 commit 948986c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pyciemss/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pyciemss/ouu/ouu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand Down

0 comments on commit 948986c

Please sign in to comment.