mirror of
https://github.com/snowykami/mbcp.git
synced 2024-11-22 14:17:38 +08:00
🐛 修复文档展示私有对象
This commit is contained in:
parent
4df41a16f5
commit
7331a3142e
@ -60,6 +60,14 @@ def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...],
|
|||||||
# 内部函数不注释,以防止生成文档
|
# 内部函数不注释,以防止生成文档
|
||||||
if isinstance(var, int):
|
if isinstance(var, int):
|
||||||
def partial_derivative_func(*args: Var) -> Var:
|
def partial_derivative_func(*args: Var) -> Var:
|
||||||
|
"""
|
||||||
|
@litedoc-hide
|
||||||
|
Args:
|
||||||
|
*args:
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
"""
|
||||||
args_list_plus = list(args)
|
args_list_plus = list(args)
|
||||||
args_list_plus[var] += epsilon
|
args_list_plus[var] += epsilon
|
||||||
args_list_minus = list(args)
|
args_list_minus = list(args)
|
||||||
@ -68,6 +76,7 @@ def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...],
|
|||||||
return partial_derivative_func
|
return partial_derivative_func
|
||||||
elif isinstance(var, tuple):
|
elif isinstance(var, tuple):
|
||||||
def high_order_partial_derivative_func(*args: Var) -> Var:
|
def high_order_partial_derivative_func(*args: Var) -> Var:
|
||||||
|
"""@litedoc-hide"""
|
||||||
result_func = func
|
result_func = func
|
||||||
for v in var:
|
for v in var:
|
||||||
result_func = get_partial_derivative_func(result_func, v, epsilon)
|
result_func = get_partial_derivative_func(result_func, v, epsilon)
|
||||||
|
Loading…
Reference in New Issue
Block a user