@@ -28,16 +28,18 @@ function make_dual!(::Type{T}, xdual, x, tx::NTuple{B}) where {T,B}
2828 return xdual .= Dual {T} .(x, tx... )
2929end
3030
31- myvalue (:: Type{T} , ydual:: Dual{T} ) where {T} = value (T, ydual)
31+ myvalue (:: Type{T} , ydual:: Number ) where {T} = value (T, ydual)
3232myvalue (:: Type{T} , ydual) where {T} = myvalue .(T, ydual)
3333myvalue! (:: Type{T} , y, ydual) where {T} = y .= myvalue .(T, ydual)
3434
35- myderivative (:: Type{T} , ydual:: Dual{T} ) where {T} = extract_derivative (T, ydual)
35+ myderivative (:: Type{T} , ydual:: Number ) where {T} = extract_derivative (T, ydual)
3636myderivative (:: Type{T} , ydual) where {T} = myderivative .(T, ydual)
3737myderivative! (:: Type{T} , dy, ydual) where {T} = dy .= myderivative .(T, ydual)
3838
39- function mypartials (:: Type{T} , :: Val{B} , ydual:: Dual ) where {T,B}
40- return partials (T, ydual). values
39+ function mypartials (:: Type{T} , :: Val{B} , ydual:: Number ) where {T,B}
40+ return ntuple (Val (B)) do b
41+ partials (T, ydual, b)
42+ end
4143end
4244
4345function mypartials (:: Type{T} , :: Val{B} , ydual) where {T,B}
0 commit comments