Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "FillArrays"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "0.11.6"
version = "0.11.7"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
2 changes: 1 addition & 1 deletion src/FillArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ const Eye{T,Axes} = RectOrDiagonal{T,Ones{T,1,Tuple{Axes}}}
isone(::SquareEye) = true

# These should actually be in StdLib, LinearAlgebra.jl, for all Diagonal
for f in (:permutedims, :triu, :triu!, :tril, :tril!)
for f in (:permutedims, :triu, :triu!, :tril, :tril!, :copy)
@eval ($f)(IM::Diagonal{<:Any,<:AbstractFill}) = IM
end

Expand Down
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,7 @@ end
@testset "Eye identity ops" begin
m = Eye(10)
D = Diagonal(Fill(2,10))

for op in (permutedims, inv)
@test op(m) === m
end
Expand All @@ -938,6 +939,11 @@ end
@test op(m) === m
end
end

@test copy(m) ≡ m
@test copy(D) ≡ D
@test LinearAlgebra.copy_oftype(m, Int) ≡ Eye{Int}(10)
@test LinearAlgebra.copy_oftype(D, Float64) ≡ Diagonal(Fill(2.0,10))
end

@testset "Issue #31" begin
Expand Down