mirror of
https://github.com/snowykami/mbcp.git
synced 2024-11-22 06:07:37 +08:00
✨ 新增函数柯里化功能
This commit is contained in:
parent
d027d4b862
commit
d984fca8eb
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user