Skip to content

Commit 1b0b043

Browse files
authored
improve inference in BlockBandedMatrix conversion (#210)
1 parent a830e33 commit 1b0b043

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Operators/general/algebra.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ for TYP in (:BlockBandedMatrix, :BandedBlockBandedMatrix)
443443

444444
# find optimal truncations for each operator
445445
# by finding the non-zero entries
446-
KRlin = Matrix{Union{Block,InfiniteCardinal{0}}}(undef,length(P.ops),2)
446+
KRlin = Matrix{Union{Block{1,Int},InfiniteCardinal{0}}}(undef,length(P.ops),2)
447447

448448
KRlin[1,1],KRlin[1,2] = first(KR),last(KR)
449449
for m=1:length(P.ops)-1
@@ -458,7 +458,7 @@ for TYP in (:BlockBandedMatrix, :BandedBlockBandedMatrix)
458458
end
459459

460460

461-
KRl = Matrix{Block{1}}(KRlin)
461+
KRl = Matrix{Block{1,Int}}(KRlin)
462462

463463
# Check if any range is invalid, in which case return zero
464464
for m=1:length(P.ops)

0 commit comments

Comments
 (0)