Skip to content

Commit f2525d7

Browse files
committed
re-enable LQ tests
1 parent 6ba1d6f commit f2525d7

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ BlockArrays = "1.2.0"
2424
EllipsisNotation = "1.8.0"
2525
GradedUnitRanges = "0.1.0"
2626
LinearAlgebra = "1.10"
27-
MatrixAlgebraKit = "0.1.0"
27+
MatrixAlgebraKit = "0.1.1"
2828
TupleTools = "1.6.0"
2929
TypeParameterAccessors = "0.2.1, 0.3"
3030
julia = "1.10"

test/test_factorizations.jl

+13-14
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,19 @@ end
5252
@test size(Q, 1) == size(Q, 2) * size(Q, 3) # Q is unitary
5353
end
5454

55-
# TODO: broken and segfaults because of MatrixAlgebraKit issue
56-
# @testset "Compact LQ ($T)" for T in elts
57-
# A = randn(T, 5, 4, 3, 2) # compact only makes a difference for less rows
58-
# labels_A = (:a, :b, :c, :d)
59-
# labels_Q = (:d, :c)
60-
# labels_L = (:b, :a)
61-
62-
# Acopy = deepcopy(A)
63-
# L, Q = @constinferred lq(A, labels_A, labels_L, labels_Q; full=false)
64-
# @test A == Acopy # should not have altered initial array
65-
# A′ = contract(labels_A, L, (labels_L..., :q), Q, (:q, labels_Q...))
66-
# @test A ≈ A′
67-
# @test size(Q, 1) == min(size(A, 1) * size(A, 2), size(A, 3) * size(A, 4)) # Q is unitary
68-
# end
55+
@testset "Compact LQ ($T)" for T in elts
56+
A = randn(T, 5, 4, 3, 2) # compact only makes a difference for less rows
57+
labels_A = (:a, :b, :c, :d)
58+
labels_Q = (:d, :c)
59+
labels_L = (:b, :a)
60+
61+
Acopy = deepcopy(A)
62+
L, Q = @constinferred lq(A, labels_A, labels_L, labels_Q; full=false)
63+
@test A == Acopy # should not have altered initial array
64+
A′ = contract(labels_A, L, (labels_L..., :q), Q, (:q, labels_Q...))
65+
@test A A′
66+
@test size(Q, 1) == min(size(A, 1) * size(A, 2), size(A, 3) * size(A, 4)) # Q is unitary
67+
end
6968

7069
# Eigenvalue Decomposition
7170
# ------------------------

0 commit comments

Comments
 (0)