新增函数柯里化功能

This commit is contained in:
远野千束 2024-08-29 19:00:01 +08:00
parent d027d4b862
commit d984fca8eb

View File

@ -73,7 +73,14 @@ 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"""
"""
@litedoc-hide
求高阶偏导函数
Args:
*args: 参数
Returns:
高阶偏导数值
"""
result_func = func
for v in var:
result_func = get_partial_derivative_func(result_func, v, epsilon)