diff --git a/DifferentiationInterface/CHANGELOG.md b/DifferentiationInterface/CHANGELOG.md index 5decdf9dc..93173bf13 100644 --- a/DifferentiationInterface/CHANGELOG.md +++ b/DifferentiationInterface/CHANGELOG.md @@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add support for HyperHessians backend ([#940](https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/940)) +### Fixed + +- Proper eltype in wrong-mode pushforward/pullback ([#1003](https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/1003)) + ## [0.7.17](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterface-v0.7.16...DifferentiationInterface-v0.7.17) ### Fixed diff --git a/DifferentiationInterface/src/utils/linalg.jl b/DifferentiationInterface/src/utils/linalg.jl index e11b7e266..b27706a5e 100644 --- a/DifferentiationInterface/src/utils/linalg.jl +++ b/DifferentiationInterface/src/utils/linalg.jl @@ -44,5 +44,5 @@ Convert an array of tuples `tx` into a tuple of arrays, while respecting the arr arroftup_to_tupofarr(tx::NTuple{B, <:Number}, x::Number) where {B} = tx function arroftup_to_tupofarr(tx::AbstractArray{<:NTuple{B, <:Number}}, x::AbstractArray{<:Number}) where {B} - return ntuple(b -> similar(x) .= getindex.(tx, b), Val(B)) + return ntuple(b -> similar(x, eltype(eltype(tx))) .= getindex.(tx, b), Val(B)) end