-
Notifications
You must be signed in to change notification settings - Fork 10
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
Use vector of indexes #49
Comments
This should probably be an error. Right now it does not notice the indexing on the left, and treats it like julia> v ≈ @reduce v2[j] := mean(i) vs[i][j]
true
julia> @pretty @reduce v[ixs[j]] := mean(i) vs[i][j]
begin
@boundscheck vs isa Tuple || (ndims(vs) == 1 || throw(ArgumentError("expected a vector or tuple vs[i]")))
local dragonfly = transmute(stack(vs), Val((2, 1)))
v = dropdims(mean(dragonfly, dims = 1), dims = 1)
end The package used to support things like Indexing on the left is messier, as it's not entirely clear whether you want points with the same julia> @tullio v[ixs[j]] := vs[i][j] / 10
2-element Vector{Float64}:
50.51324364045704
60.28909109465455 |
If I understand correctly, overwriting is a special case of aggregation using |
I agree this could be given meanings. However I'm hoping not to add too many more features to this package! For now at least it shouldn't silently do the wrong thing. |
I wanted to reduce into a 2-vector by using the indexes stored in
ixs
. Currently it seems to ignoreixs
. What do you think about this idea?The text was updated successfully, but these errors were encountered: