@@ -111,35 +111,35 @@ end
111111@testset " correct form of Q from lq(...) (#23729)" begin
112112 # where the original matrix (say A) is square or has more rows than columns,
113113 # then A's factorization's triangular factor (say L) should have the same shape
114- # as A independent of factorization form (truncated, square ), and A's factorization's
114+ # as A independent of factorization form (square, rectangular/"thin" ), and A's factorization's
115115 # orthogonal factor (say Q) should be a square matrix of order of A's number of
116- # columns independent of factorization form (truncated, square ), and L and Q
116+ # columns independent of factorization form (square, rectangular/"thin" ), and L and Q
117117 # should have multiplication-compatible shapes.
118118 m, n = 4 , 2
119119 A = randn (m, n)
120- for thin in (true , false )
121- L, Q = lq (A, thin = thin )
120+ for square in (false , true )
121+ L, Q = lq (A, square = square )
122122 @test size (L) == (m, n)
123123 @test size (Q) == (n, n)
124124 @test isapprox (A, L* Q)
125125 end
126126 # where the original matrix has strictly fewer rows than columns ...
127127 m, n = 2 , 4
128128 A = randn (m, n)
129- # ... then, for a truncated factorization of A, L should be a square matrix
129+ # ... then, for a rectangular/"thin" factorization of A, L should be a square matrix
130130 # of order of A's number of rows, Q should have the same shape as A,
131131 # and L and Q should have multiplication-compatible shapes
132- Lthin, Qthin = lq (A, thin = true )
133- @test size (Lthin ) == (m, m)
134- @test size (Qthin ) == (m, n)
135- @test isapprox (A, Lthin * Qthin )
136- # ... and, for a square/non-truncated factorization of A, L should have the
132+ Lrect, Qrect = lq (A, square = false )
133+ @test size (Lrect ) == (m, m)
134+ @test size (Qrect ) == (m, n)
135+ @test isapprox (A, Lrect * Qrect )
136+ # ... and, for a square factorization of A, L should have the
137137 # same shape as A, Q should be a square matrix of order of A's number of columns,
138138 # and L and Q should have multiplication-compatible shape. but instead the L returned
139- # has no zero-padding on the right / is L for the truncated factorization,
139+ # has no zero-padding on the right / is L for the rectangular/"thin" factorization,
140140 # so for L and Q to have multiplication-compatible shapes, L must be zero-padded
141141 # to have the shape of A.
142- Lsquare, Qsquare = lq (A, thin = false )
142+ Lsquare, Qsquare = lq (A, square = true )
143143 @test size (Lsquare) == (m, m)
144144 @test size (Qsquare) == (n, n)
145145 @test isapprox (A, [Lsquare zeros (m, n - m)] * Qsquare)
0 commit comments