Skip to content

Commit 7c68157

Browse files
authored
type inference in row/col start/stop (#377)
* minor improvements in type inference in row/col start/stop * Remove function barrier * allow infinite row/col start/stop
1 parent d334743 commit 7c68157

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Operators/general/algebra.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ for OP in (:rowstart, :rowstop)
397397
return $defOP(P, k)
398398
end
399399
for j = eachindex(P.ops)
400-
k = $OP(P.ops[j], k)
400+
k = $OP(P.ops[j], k)::Union{Int, InfiniteCardinal{0}}
401401
end
402402
k
403403
end
@@ -410,7 +410,7 @@ for OP in (:colstart, :colstop)
410410
return $defOP(P, k)
411411
end
412412
for j = reverse(eachindex(P.ops))
413-
k = $OP(P.ops[j], k)
413+
k = $OP(P.ops[j], k)::Union{Int, InfiniteCardinal{0}}
414414
end
415415
k
416416
end

src/PDE/KroneckerOperator.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function rowstop(A::KroneckerOperator,k::Integer)
9696
K=block(rangespace(A),k)
9797
ds = domainspace(A)
9898
K2 = Int(K)+blockbandwidth(A,2)
99-
K2 blocksize(ds) && return size(A,2)
99+
K2 blocksize(ds)[1] && return size(A,2)
100100
st=blockstop(ds,K2)
101101
# zero indicates above dimension
102102
st==0 ? size(A,2) : min(size(A,2),st)

0 commit comments

Comments
 (0)