Skip to content

Commit 1423a4a

Browse files
committed
Fix expand_derivatives
1 parent 23fe8bc commit 1423a4a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/differentials.jl

+1-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ function expand_derivatives(O::Operation)
5757

5858
return O
5959
end
60-
expand_derivatives(::Constant) = Constant(0)
6160
expand_derivatives(x) = x
6261

6362
# Don't specialize on the function here
@@ -96,7 +95,7 @@ sin(x())
9695
```
9796
"""
9897
derivative(O::Operation, idx) = derivative(O.op, (O.args...,), Val(idx))
99-
derivative(O::Constant, _) = Constant(0)
98+
derivative(O::Constant, ::Any) = Constant(0)
10099

101100
# Pre-defined derivatives
102101
import DiffRules, SpecialFunctions, NaNMath

0 commit comments

Comments
 (0)