Skip to content

Commit 6051590

Browse files
authored
Merge pull request #20971 from Sacha0/nixrowvecambigs
resolve ambiguity between * methods
2 parents 5e8f62c + 294b253 commit 6051590

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

base/linalg/rowvector.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ end
165165

166166
# inner product -> dot product specializations
167167
@inline *{T<:Real}(rowvec::RowVector{T}, vec::AbstractVector{T}) = dot(parent(rowvec), vec)
168+
@inline *{T<:Real}(rowvec::ConjRowVector{T}, vec::AbstractVector{T}) = dot(rowvec', vec)
168169
@inline *(rowvec::ConjRowVector, vec::AbstractVector) = dot(rowvec', vec)
169170

170171
# Generic behavior

test/linalg/rowvector.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,3 +249,7 @@ end
249249
@test A'*x' == A'*y == B*x' == B*y == C'
250250
end
251251
end
252+
253+
@testset "ambiguity between * methods with RowVectors and ConjRowVectors (#20971)" begin
254+
@test RowVector(ConjArray(ones(4))) * ones(4) == 4
255+
end

0 commit comments

Comments
 (0)