Skip to content

Commit

Permalink
Merge pull request #1074 from LilithHafner/lh/var-name-nfc
Browse files Browse the repository at this point in the history
Accurately refer to function argument names in docstrings
  • Loading branch information
ChrisRackauckas authored Feb 26, 2024
2 parents 1ef8c1d + 30395b2 commit 2921181
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/diff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2921181

Please sign in to comment.