From 7331a3142ef0d8968869555f7008dcd6a0d4b031 Mon Sep 17 00:00:00 2001 From: snowy Date: Thu, 29 Aug 2024 15:43:24 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E7=A7=81=E6=9C=89=E5=AF=B9=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mbcp/mp_math/equation.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mbcp/mp_math/equation.py b/mbcp/mp_math/equation.py index 95d6483..61abf3b 100644 --- a/mbcp/mp_math/equation.py +++ b/mbcp/mp_math/equation.py @@ -60,6 +60,14 @@ def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], # 内部函数不注释,以防止生成文档 if isinstance(var, int): def partial_derivative_func(*args: Var) -> Var: + """ + @litedoc-hide + Args: + *args: + + Returns: + + """ args_list_plus = list(args) args_list_plus[var] += epsilon args_list_minus = list(args) @@ -68,6 +76,7 @@ def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], return partial_derivative_func elif isinstance(var, tuple): def high_order_partial_derivative_func(*args: Var) -> Var: + """@litedoc-hide""" result_func = func for v in var: result_func = get_partial_derivative_func(result_func, v, epsilon)