Skip to content

Commit a3f1d51

Browse files
committed
transpose and adjoint vector
1 parent 009cb66 commit a3f1d51

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/mul.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,8 @@ end
349349

350350
# Disambiguation with FillArrays
351351
*(A::AbstractFill{<:Any,2}, B::LayoutVector) = invoke(*, Tuple{AbstractFill{<:Any,2}, AbstractVector}, A, B)
352+
*(A::Adjoint{<:Any, <:LayoutVector}, B::AbstractFill{<:Any,2}) = invoke(*, Tuple{Adjoint{<:Any, <:AbstractVector}, AbstractFill{<:Any,2}}, A, B)
353+
*(A::Transpose{<:Any, <:LayoutVector}, B::AbstractFill{<:Any,2}) = invoke(*, Tuple{Transpose{<:Any, <:AbstractVector}, AbstractFill{<:Any,2}}, A, B)
352354

353355
## special routines introduced in v0.9. We need to avoid these to support ∞-arrays
354356

test/test_layoutarray.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,4 +638,13 @@ using .InfiniteArrays
638638
end
639639
end
640640

641+
@testset "disambiguation with FillArrays" begin
642+
v = [1,2,3]
643+
lv = MyVector(v)
644+
F = Fill(2, 3, 3)
645+
@test F * lv == F * v
646+
@test lv' * F == v' * F
647+
@test transpose(lv) * F == transpose(v) * F
648+
end
649+
641650
end

0 commit comments

Comments
 (0)