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

gather on a sparse source should return a dense array #625

Open
CarloLucibello opened this issue Jan 13, 2025 · 0 comments
Open

gather on a sparse source should return a dense array #625

CarloLucibello opened this issue Jan 13, 2025 · 0 comments

Comments

@CarloLucibello
Copy link
Member

This is the current behavior:

julia> s = [1, 2, 3];

julia> t = [2, 3, 1];

julia> A = sparse(s, t, [1.0, 1.0, 1.0], 3, 3)
3×3 SparseMatrixCSC{Float64, Int64} with 3 stored entries:
     1.0    
         1.0
 1.0        

julia> w = NNlib.gather(A, s, t)
3-element SparseVector{Float64, Int64} with 3 stored entries:
  [1]  =  1.0
  [2]  =  1.0
  [3]  =  1.0

I would expect w to be a dense vector instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant