Skip to content

Commit eaa9e36

Browse files
authored
Use first in _firstblock (#152)
1 parent 3dd06c5 commit eaa9e36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BandedBlockBandedMatrix.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,10 @@ isbandedblockbanded(A::SubArray{<:Any,2,<:BandedBlockBandedMatrix}) = MemoryLayo
450450
subblockbandwidths(V::SubArray) = subblockbandwidths(parent(V))
451451

452452

453-
_firstblock(B::BlockedUnitRange) = Int(blockaxes(B,1)[1])
453+
_firstblock(B::BlockedUnitRange) = Int(first(blockaxes(B,1)))
454454
_firstblock(B::Block{1}) = Int(B)
455455
_firstblock(B::BlockIndexRange) = _firstblock(B.block)
456-
_firstblock(B::BlockRange) = B.indices[1][1]
456+
_firstblock(B::BlockRange) = first(B.indices[1])
457457
_firstblock(B::Base.Slice) = _firstblock(B.indices)
458458
_firstblock(B::BlockSlice) = _firstblock(B.block)
459459

0 commit comments

Comments
 (0)