Skip to content

Commit ab9138c

Browse files
mzaffalonMichele Zaffalon
and
Michele Zaffalon
authored
Fix kron product on sum spaces (#640)
* Fix kron product on sum spaces * Update Project.toml --------- Co-authored-by: Michele Zaffalon <[email protected]>
1 parent a40023d commit ab9138c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Project.toml

+1-1
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.9.25"
3+
version = "0.9.26"
44

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

src/Multivariate/Multivariate.jl

+4-3
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)