Skip to content

Commit 5202e27

Browse files
authored
Backport: Fix kron product on sum spaces #640 (#641)
1 parent 391bb31 commit 5202e27

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-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 = "ApproxFunBase"
22
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
3-
version = "0.8.65"
3+
version = "0.8.66"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/Multivariate/Multivariate.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,12 @@ function Base.kron(f::Fun,g::Fun)
9494
sp=space(f)space(g)
9595
it=tensorizer(sp)
9696
N=ncoefficients(f);M=ncoefficients(g)
97+
n=ncomponents(f);m=ncomponents(g)
9798
cfs=Array{promote_type(cfstype(f),cfstype(g))}(undef,0)
9899
for (k,j) in it
99-
# Tensor product is N x M, so if we are outside
100-
# the (N+M)th diagonal we have no more entries
101-
if k+j > N+M
100+
# Tensor product is n*N x m*M, so if we are outside
101+
# the (n*N+m*M)th diagonal we have no more entries
102+
if k+j > N*n+M*m
102103
break
103104
elseif k N && j M
104105
push!(cfs,f.coefficients[k]*g.coefficients[j])

0 commit comments

Comments
 (0)