diff --git a/scipy-stubs/optimize/_cobyla_py.pyi b/scipy-stubs/optimize/_cobyla_py.pyi index 5c4850fd..a02284bb 100644 --- a/scipy-stubs/optimize/_cobyla_py.pyi +++ b/scipy-stubs/optimize/_cobyla_py.pyi @@ -1,18 +1,19 @@ -from collections.abc import Callable -from typing import Literal +from collections.abc import Callable, Sequence +from typing import Concatenate, Literal, TypeAlias import numpy as np import optype.numpy as onp -from scipy._typing import Untyped, UntypedCallable __all__ = ["fmin_cobyla"] +_Ignored: TypeAlias = object + ### def fmin_cobyla( - func: UntypedCallable, - x0: Untyped, - cons: Untyped, + func: Callable[Concatenate[onp.Array1D[np.float64], ...], onp.ToFloat], + x0: onp.ToArray1D, + cons: Sequence[Callable[[onp.Array1D[np.float64]], onp.ToFloat | onp.ToFloat1D]], args: tuple[object, ...] = (), consargs: tuple[object, ...] | None = None, rhobeg: onp.ToFloat = 1.0, @@ -21,5 +22,5 @@ def fmin_cobyla( disp: Literal[0, 1, 2, 3] | None = None, catol: onp.ToFloat = 0.0002, *, - callback: Callable[[onp.Array1D[np.float64]], None] | None = None, + callback: Callable[[onp.Array1D[np.float64]], _Ignored] | None = None, ) -> onp.Array1D[np.float64]: ...