Skip to content

Commit bb2b587

Browse files
authored
Fix Tests (#165)
* Fix Tests * Test on v1
1 parent b6d23f3 commit bb2b587

File tree

6 files changed

+15
-5
lines changed

6 files changed

+15
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
matrix:
3939
version:
4040
- '1.9'
41+
- '1'
4142
os:
4243
- ubuntu-latest
4344
- macOS-latest

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "InfiniteLinearAlgebra"
22
uuid = "cde9dba0-b1de-11e9-2c62-0bab9446c55c"
3-
version = "0.7.3"
3+
version = "0.7.4"
44

55
[deps]
66
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"

src/banded/hessenbergq.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,17 @@ end
147147
# getindex
148148
####
149149

150+
function _getindex_by_col(Q, I, J)
151+
T = eltype(Q)
152+
ret = Matrix{T}(undef, length(I), length(J))
153+
for j in J
154+
ret[:,j] = Q[:,j][I]
155+
end
156+
ret
157+
end
158+
150159
getindex(Q::UpperHessenbergQ, I::AbstractVector{Int}, J::AbstractVector{Int}) =
151-
hcat((Q[:,j][I] for j in J)...)
160+
_getindex_by_col(Q, I, J)
152161

153162
getindex(Q::LowerHessenbergQ, i::Int, j::Int) = (Q')[j,i]'
154163
getindex(Q::LowerHessenbergQ, I::AbstractVector{Int}, J::AbstractVector{Int}) =

src/banded/infqltoeplitz.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ if VERSION < v"1.8-"
127127
end
128128
end
129129
getindex(Q::ProductQ, I::AbstractVector{Int}, J::AbstractVector{Int}) =
130-
hcat((Q[:,j][I] for j in J)...)
130+
_getindex_by_col(Q, I, J)
131131

132132
getindex(Q::ProductQ{<:Any,<:Tuple{Vararg{LowerHessenbergQ}}}, i::Int, j::Int) = (Q')[j, i]'
133133

src/infqr.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ partialqr!(F::AdaptiveQRFactors, n) = partialqr!(F.data, n)
163163
#########
164164

165165
getindex(Q::QRPackedQ{<:Any,<:AdaptiveQRFactors,<:AdaptiveQRTau}, I::AbstractVector{Int}, J::AbstractVector{Int64}) =
166-
hcat((Q[:,j][I] for j in J)...)
166+
_getindex_by_col(Q, I, J)
167167

168168
#########
169169
# lmul!

test/test_infql.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ using ArrayLayouts: TriangularLayout, UnknownLayout
198198

199199
@test (L*Q)[1:10,1:10] LazyBandedMatrices.SymTridiagonal(L*Q)[1:10,1:10]
200200
@test Q[5,6:8] == [Q[5,k] for k = 6:8]
201-
@test Q[6:8,5] == [Q[k,5] for k = 6:8]
201+
@test Q[6:8,5] [Q[k,5] for k = 6:8]
202202
end
203203

204204
@test_throws ErrorException ql(zeros(∞,∞))

0 commit comments

Comments
 (0)