Skip to content

Commit f477fa3

Browse files
authored
fix: proper eltype in wrong-mode pushforward/pullback (#1003)
* fix: proper eltype in wrong-mode pushforward/pullback * Fix * Without type parameter to avoid angering Aqua * Changelog
1 parent cb6801e commit f477fa3

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

DifferentiationInterface/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
- Add support for HyperHessians backend ([#940](https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/940))
1515

16+
### Fixed
17+
18+
- Proper eltype in wrong-mode pushforward/pullback ([#1003](https://github.com/JuliaDiff/DifferentiationInterface.jl/pull/1003))
19+
1620
## [0.7.17](https://github.com/JuliaDiff/DifferentiationInterface.jl/compare/DifferentiationInterface-v0.7.16...DifferentiationInterface-v0.7.17)
1721

1822
### Fixed

DifferentiationInterface/src/utils/linalg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ Convert an array of tuples `tx` into a tuple of arrays, while respecting the arr
4444
arroftup_to_tupofarr(tx::NTuple{B, <:Number}, x::Number) where {B} = tx
4545

4646
function arroftup_to_tupofarr(tx::AbstractArray{<:NTuple{B, <:Number}}, x::AbstractArray{<:Number}) where {B}
47-
return ntuple(b -> similar(x) .= getindex.(tx, b), Val(B))
47+
return ntuple(b -> similar(x, eltype(eltype(tx))) .= getindex.(tx, b), Val(B))
4848
end

0 commit comments

Comments
 (0)