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

collecting an eduction over StructArrays gives regular arrays #532

Open
MasonProtter opened this issue Aug 30, 2022 · 0 comments
Open

collecting an eduction over StructArrays gives regular arrays #532

MasonProtter opened this issue Aug 30, 2022 · 0 comments

Comments

@MasonProtter
Copy link
Member

Looks like a bad output container is being selected by collect here:

julia> using Transducers, StructArrays

julia> data = StructArray(a=1:10);

julia> data |> Map(x -> (a=x.a^2,)) |> Filter(x -> x.a > 10) |> collect
7-element Vector{NamedTuple{(:a,), Tuple{Int64}}}:
 (a = 16,)
 (a = 25,)
 (a = 36,)
 (a = 49,)
 (a = 64,)
 (a = 81,)
 (a = 100,)
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