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! misses the multi index method #626

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

gather! misses the multi index method #626

CarloLucibello opened this issue Jan 13, 2025 · 0 comments

Comments

@CarloLucibello
Copy link
Member

For gather you have the multi-index version

julia> using SparseArray, NNlin

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

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

julia> A = collect(sparse(s, t, [1.0, 1.0, 1.0], 3, 3))
3×3 Matrix{Float64}:
 0.0  1.0  0.0
 0.0  0.0  1.0
 1.0  0.0  0.0

julia> w = NNlib.gather(A, s, t)
3-element Vector{Float64}:
 1.0
 1.0
 1.0

For the mutating version gather! instead, the method is missing

w = [0.0, 0.0, 0.0]
NNlib.gather!(w, A, s, t) # method ERROR
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