From 30395b288ac64e40c6c7dc5b5e9341eb36d83986 Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Mon, 26 Feb 2024 13:35:51 -0600 Subject: [PATCH] Accurately refer to function argument names in docstrings --- src/diff.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/diff.jl b/src/diff.jl index 41bfc458a..81ac4e9e2 100644 --- a/src/diff.jl +++ b/src/diff.jl @@ -422,21 +422,21 @@ end """ $(SIGNATURES) -A helper function for computing the derivative of an expression with respect to +A helper function for computing the derivative of the expression `O` with respect to `var`. """ -function derivative(O, v; simplify=false) +function derivative(O, var; simplify=false) if O isa AbstractArray - Num[Num(expand_derivatives(Differential(v)(value(o)), simplify)) for o in O] + Num[Num(expand_derivatives(Differential(var)(value(o)), simplify)) for o in O] else - Num(expand_derivatives(Differential(v)(value(O)), simplify)) + Num(expand_derivatives(Differential(var)(value(O)), simplify)) end end """ $(SIGNATURES) -A helper function for computing the gradient of an expression with respect to +A helper function for computing the gradient of the expression `O` with respect to an array of variable expressions. """ function gradient(O, vars::AbstractVector; simplify=false) @@ -606,7 +606,7 @@ end """ $(SIGNATURES) -A helper function for computing the Hessian of an expression with respect to +A helper function for computing the Hessian of the expression `O` with respect to an array of variable expressions. """ function hessian(O, vars::AbstractVector; simplify=false)