Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Add (row/col)support for inv(Triangular)" #338

Merged
merged 1 commit into from
Jul 11, 2024
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 = "LazyArrays"
uuid = "5078a376-72f3-5289-bfd5-ec5146d43c02"
version = "2.1.7"
version = "2.1.8"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand Down
15 changes: 1 addition & 14 deletions src/linalg/inv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,4 @@
getindex(L::ApplyMatrix{<:Any,typeof(/)}, k::Integer, j::Integer) = L[k,:][j]


inv_layout(::LazyLayouts, _, A) = ApplyArray(inv, A)

###
# row/colsupport triangular
###
function colsupport(lay::AbstractInvLayout{<:TriangularLayout}, A, j)
B, = arguments(lay, A)
return colsupport(B, j)
end

function rowsupport(lay::AbstractInvLayout{<:TriangularLayout}, A, k)
B, = arguments(lay, A)
return rowsupport(B, k)
end
inv_layout(::LazyLayouts, _, A) = ApplyArray(inv, A)

Check warning on line 187 in src/linalg/inv.jl

View check run for this annotation

Codecov / codecov/patch

src/linalg/inv.jl#L187

Added line #L187 was not covered by tests
16 changes: 0 additions & 16 deletions test/ldivtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -181,20 +181,4 @@ end
@test Z \ Y ≈ [-2.0 1.0; 1.5 -0.5]
end

@testset "Issue #329" begin
for op in (UpperTriangular, UnitUpperTriangular)
A = UpperTriangular(ApplyArray(inv, rand(5, 5)))
B = inv(A)
@test colsupport.(Ref(B), 1:5) == Base.OneTo.(1:5)
@test rowsupport.(Ref(B), 1:5) == range.(1:5, 5)
end

for op in (LowerTriangular, UnitLowerTriangular)
A = LowerTriangular(ApplyArray(inv, rand(15, 15)))
B = inv(A)
@test colsupport.(Ref(B), 1:15) == range.(1:15, 15)
@test rowsupport.(Ref(B), 1:15) == Base.OneTo.(1:15)
end
end

end # module
Loading