Skip to content

Use vector of indexes #49

Closed
Closed
@jariji

Description

@jariji

I wanted to reduce into a 2-vector by using the indexes stored in ixs. Currently it seems to ignore ixs. What do you think about this idea?

using TensorCast
vs = [[10,20,30,40,50,60] .+ rand(6) for _ in 1:10]
ixs = [1,2,1,2,1,2]
@reduce v[ixs[j]] := mean(i) vs[i][j]

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions