Skip to content

Commit a478a8c

Browse files
authored
Support ∞ block ranges (as implemented in InfiniteLinearAlgebra.jl) on Julia v1.6 (#152)
1 parent fe74053 commit a478a8c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "BlockArrays"
22
uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
3-
version = "0.14.2"
3+
version = "0.14.3"
44

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

src/blockaxis.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ _length(b::BlockedUnitRange, _) = Base.invoke(length, Tuple{AbstractUnitRange{In
156156
length(b::BlockedUnitRange) = _length(b, axes(blocklasts(b),1))
157157

158158
function getindex(b::BlockedUnitRange, K::Block{1})
159-
k = Int(K)
159+
k = Integer(K)
160160
bax = blockaxes(b,1)
161161
cs = blocklasts(b)
162162
@boundscheck K in bax || throw(BlockBoundsError(b, k))
@@ -169,7 +169,7 @@ function getindex(b::BlockedUnitRange, KR::BlockRange{1})
169169
cs = blocklasts(b)
170170
isempty(KR) && return _BlockedUnitRange(1,cs[1:0])
171171
K,J = first(KR),last(KR)
172-
k,j = Int(K),Int(J)
172+
k,j = Integer(K),Integer(J)
173173
bax = blockaxes(b,1)
174174
@boundscheck K in bax || throw(BlockBoundsError(b,K))
175175
@boundscheck J in bax || throw(BlockBoundsError(b,J))
@@ -181,7 +181,7 @@ function getindex(b::BlockedUnitRange, KR::BlockRange{1,Tuple{Base.OneTo{Int}}})
181181
cs = blocklasts(b)
182182
isempty(KR) && return _BlockedUnitRange(1,cs[Base.OneTo(0)])
183183
J = last(KR)
184-
j = Int(J)
184+
j = Integer(J)
185185
bax = blockaxes(b,1)
186186
@boundscheck J in bax || throw(BlockBoundsError(b,J))
187187
_BlockedUnitRange(first(b),cs[Base.OneTo(j)])

0 commit comments

Comments
 (0)