Skip to content

Commit d8c68be

Browse files
authored
Disable empty vector in findmindomain/findmaxrange (#375)
1 parent 93e79dd commit d8c68be

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Operators/general/InterlaceOperator.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ function colstop(M::InterlaceOperator, j::Integer)
240240
for N = 1:size(M.ops,1)
241241
cs = colstop(M.ops[N,J],jj)::Int
242242
if cs > 0
243-
K = max(K,findfirst(M.rangeinterlacer,(N,cs))::Int)
243+
K = max(K,findfirst((N,cs), M.rangeinterlacer)::Int)
244244
end
245245
end
246246
K

src/Operators/general/algebra.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ for TYP in (:Matrix, :BandedMatrix, :RaggedMatrix)
494494
RT2 = _rettype(RT)
495495
BA::RT2 = strictconvert(RT, P.ops[end][krl[end, 1]:krl[end, 2], jr])
496496
for m = (length(P.ops)-1):-1:1
497-
BA = strictconvert(RT, P.ops[m][krl[m, 1]:krl[m, 2], krl[m+1, 1]:krl[m+1, 2]]) * BA
497+
BA = strictconvert(RT, P.ops[m][krl[m, 1]:krl[m, 2], krl[m+1, 1]:krl[m+1, 2]])::RT2 * BA
498498
end
499499

500500
RT(BA)

src/Operators/spacepromotion.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ rangespace(S::SpaceOperator) = S.rangespace
4848

4949
##TODO: Do we need both max and min?
5050
function findmindomainspace(ops)
51-
mapreduce(domainspace, union, ops, init = UnsetSpace())
51+
mapreduce(domainspace, union, ops)
5252
end
5353

5454
function findmaxrangespace(ops)
55-
mapreduce(rangespace, maxspace, ops, init = UnsetSpace())
55+
mapreduce(rangespace, maxspace, ops)
5656
end
5757

5858

0 commit comments

Comments
 (0)