Skip to content

Commit

Permalink
Fix kron product on sum spaces (#640)
Browse files Browse the repository at this point in the history
* Fix kron product on sum spaces

* Update Project.toml

---------

Co-authored-by: Michele Zaffalon <[email protected]>
  • Loading branch information
mzaffalon and Michele Zaffalon authored Mar 5, 2024
1 parent a40023d commit ab9138c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
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 @@ function Base.kron(f::Fun,g::Fun)
sp=space(f)space(g)
it=tensorizer(sp)
N=ncoefficients(f);M=ncoefficients(g)
n=ncomponents(f);m=ncomponents(g)
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
break
elseif k N && j M
push!(cfs,f.coefficients[k]*g.coefficients[j])
Expand Down

2 comments on commit ab9138c

@jishnub
Copy link
Member

@jishnub jishnub commented on ab9138c Mar 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/102298

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.26 -m "<description of version>" ab9138c97a920efa3bdc0d2163eff8917b67e069
git push origin v0.9.26

Please sign in to comment.