Skip to content

gather! misses the multi index method #626

@CarloLucibello

Description

@CarloLucibello

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions