Commit 6ebf4ca
committed
Fix type stability bug in gradient
cc @timholy
I don't know if this is the best possible solution to the problem, but
it does allow us to do things like gradient(itp, dual(2,1)) and get an
Array{DualNumbers{Float64},1} back.
Before, that incantation would throw an InexactError because it was
trying to fit a dual number with nonzero epsilon into an Array{Float64}.1 parent ac9445a commit 6ebf4ca
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 75 | + | |
| 76 | + | |
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
| |||
0 commit comments