Skip to content

Commit 4df70da

Browse files
authored
Merge pull request #208 from JuliaDiff/ox/bundle3
Restrict types in `bundle` to avoid ambiguity errors
2 parents 71015ac + f0f45f8 commit 4df70da

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/AbstractDifferentiation.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ This is more or less the Diffractor equivelent of ForwardDiff.jl's `Dual` type.
1111
function bundle end
1212
bundle(x, dx::ChainRulesCore.AbstractZero) = UniformBundle{1, typeof(x), typeof(dx)}(x, dx)
1313
bundle(x::Number, dx::Number) = TaylorBundle{1}(x, (dx,))
14-
bundle(x::AbstractArray{<:Number}, dx) = TaylorBundle{1}(x, (dx,))
15-
bundle(x::AbstractArray, dx) = error("Nonnumeric arrays not implemented, that type is a mess")
14+
bundle(x::AbstractArray{<:Number}, dx::AbstractArray{<:Number}) = TaylorBundle{1}(x, (dx,))
1615
bundle(x::P, dx::Tangent{P}) where P = _bundle(x, ChainRulesCore.canonicalize(dx))
1716

1817
"helper that assumes tangent is in canonical form"

0 commit comments

Comments
 (0)