From 7763cf24fa150a713bcd4700764c888de7e904e7 Mon Sep 17 00:00:00 2001 From: jorenham Date: Sun, 1 Dec 2024 18:33:59 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20complete=20`optimize.fmin=5Fcobyla`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scipy-stubs/optimize/_cobyla_py.pyi | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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]: ...