Skip to content

Commit 4e01ec5

Browse files
authored
Fix Vector-AdjVector product (#155)
1 parent d92a441 commit 4e01ec5

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/implementations/LinearAlgebra.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,13 @@ function promote_array_mul(
198198
return Matrix{promote_sum_mul(S, T)}
199199
end
200200

201+
function promote_array_mul(
202+
::Type{<:AbstractVector{S}},
203+
::Type{<:LinearAlgebra.Adjoint{T,<:AbstractVector{T}}},
204+
) where {S,T}
205+
return Matrix{promote_sum_mul(S, T)}
206+
end
207+
201208
function promote_array_mul(
202209
::Type{<:AbstractMatrix{S}},
203210
::Type{<:AbstractVector{T}},

test/matmul.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,3 +312,10 @@ Base.convert(::Type{Base.OneTo}, x::Issue65OneTo) = Base.OneTo(x.N)
312312
@test MA.operate(*, A, x[:, 1]) == x * x[:, 1]
313313
@test MA.operate(*, A, x) == x * x
314314
end
315+
316+
@testset "Issue 154" begin
317+
X = big.([1 2; 3 4])
318+
c = big.([5, 6])
319+
MA.operate!!(MA.add_mul, X, c, c')
320+
@test X == [26 32; 33 40]
321+
end

0 commit comments

Comments
 (0)