🐛 修复文档展示私有对象

This commit is contained in:
远野千束 2024-08-29 15:43:24 +08:00
parent 4df41a16f5
commit 7331a3142e

View File

@ -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)