Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kron product on sum spaces #640

Merged
merged 2 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ApproxFunBase"
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
version = "0.9.25"
version = "0.9.26"

[deps]
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
Expand Down
7 changes: 4 additions & 3 deletions src/Multivariate/Multivariate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@
sp=space(f)⊗space(g)
it=tensorizer(sp)
N=ncoefficients(f);M=ncoefficients(g)
n=ncomponents(f);m=ncomponents(g)

Check warning on line 97 in src/Multivariate/Multivariate.jl

View check run for this annotation

Codecov / codecov/patch

src/Multivariate/Multivariate.jl#L97

Added line #L97 was not covered by tests
cfs=Array{promote_type(cfstype(f),cfstype(g))}(undef,0)
for (k,j) in it
# Tensor product is N x M, so if we are outside
# the (N+M)th diagonal we have no more entries
if k+j > N+M
# Tensor product is n*N x m*M, so if we are outside
# the (n*N+m*M)th diagonal we have no more entries
if k+j > N*n+M*m

Check warning on line 102 in src/Multivariate/Multivariate.jl

View check run for this annotation

Codecov / codecov/patch

src/Multivariate/Multivariate.jl#L102

Added line #L102 was not covered by tests
break
elseif k ≤ N && j ≤ M
push!(cfs,f.coefficients[k]*g.coefficients[j])
Expand Down
Loading