diff --git a/Project.toml b/Project.toml index 5e6514fd..b5c826ea 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "FillArrays" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "0.12.4" +version = "0.12.5" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" diff --git a/src/FillArrays.jl b/src/FillArrays.jl index 412ce7c0..c5d2c3b1 100644 --- a/src/FillArrays.jl +++ b/src/FillArrays.jl @@ -701,6 +701,8 @@ getindex_value(a::LinearAlgebra.Adjoint) = adjoint(getindex_value(parent(a))) getindex_value(a::LinearAlgebra.Transpose) = transpose(getindex_value(parent(a))) getindex_value(a::SubArray) = getindex_value(parent(a)) +copy(a::LinearAlgebra.Adjoint{<:Any,<:AbstractFill}) = copy(parent(a))' +copy(a::LinearAlgebra.Transpose{<:Any,<:AbstractFill}) = transpose(parent(a)) ## # view diff --git a/test/runtests.jl b/test/runtests.jl index d506c4c0..953ab1d4 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1020,6 +1020,8 @@ end @test Fill(1+im, 5, 6)' ≡ Fill(1-im, 6,5) @test transpose(Fill(1+im, 5, 6)) ≡ Fill(1+im, 6,5) @test Ones(5)' isa Adjoint # Vectors still need special dot product + @test copy(Ones(5)') ≡ Ones(5)' + @test copy(transpose(Ones(5))) ≡ transpose(Ones(5)) @test Fill([1+im 2; 3 4; 5 6], 2,3)' == Fill([1+im 2; 3 4; 5 6]', 3,2) @test transpose(Fill([1+im 2; 3 4; 5 6], 2,3)) == Fill(transpose([1+im 2; 3 4; 5 6]), 3,2)