# kron(::SparseVector,::SparseVector) returns a dense vector

**URL:** <https://discourse.julialang.org/t/kron-sparsevector-sparsevector-returns-a-dense-vector/5778>\
**Category:** General Usage\
**Tags:** question\
**Created:** [September 8, 2017, 2:21am UTC](https://discourse.julialang.org/t/kron-sparsevector-sparsevector-returns-a-dense-vector/5778 "2017-09-08T02:21:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![magzpavz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/magzpavz/32/1822_2.png) [@magzpavz](https://discourse.julialang.org/u/magzpavz)\
**Post date:** [September 8, 2017, 2:21am UTC](https://discourse.julialang.org/t/kron-sparsevector-sparsevector-returns-a-dense-vector/5778/1 "2017-09-08T02:21:42Z")

</div>

hello, noobie here

`kron` (Kronecker product) does not have a method defined for `SparseVector` (though it does for `SparseMatrixCSC`), and so it gives a dense result. I’ve written myself a `kron` method which is mostly just copied from the `SparseMatrixCSC` implementation to not waste all my memory on zeros. Should I contribute this to somewhere? Would people care? What’s the etiquette?

Sorry for the kinda silly question, I’ve never used git or looked into an open-source project before 😬

---

<div class="post-metadata">

**Author:** ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)\
**Post date:** [September 8, 2017, 4:19am UTC](https://discourse.julialang.org/t/kron-sparsevector-sparsevector-returns-a-dense-vector/5778/2 "2017-09-08T04:19:10Z")

</div>

> [@magzpavz](#):
>
> Should I contribute this to somewhere? Would people care?

Generally, yes! Since the function and the types are defined in Julia Base, that’s what you should normally contribute to. But I think someone beat you to it: [kron for sparse vectors by jebej · Pull Request #23229 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/23229). Judging by the comments, there seems to be an ambiguity issue though. You could try to find out what’s going on if you want to help out and you’re up for a challenge, but just so you know: it can be a little difficult to identify such ambiguity issues as a beginner.
