-
Notifications
You must be signed in to change notification settings - Fork 37
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 StructArrays.jl #40
Comments
Does that work with Tracker? |
Hm, no it appears to not work with it at least out of the box: julia> using Tracker
julia> v = rand(10) |> param
Tracked 10-element Array{Float64,1}:
0.19747042290556305
0.3577805915969372
0.41164333584420354
0.07956973618070462
0.3882813140794923
0.030429901869670095
0.13329838162061325
0.3263069803112133
0.32484677886198
0.37871805455668994
julia> using StructArrays
julia> StructArray(v)
0-element StructArray() with eltype Float64 with indices 1:0 I wonder if we just need to pirate in the right constructor though. I don't really know anything about Tracker. Alternatively, we could just define the default to be I don't have any stakes in this, just a random thought, so feel free to ignore if this isn't the direction you're interested. |
Yeah maybe it's a better default than doing nothing. But I'd like to keep this pretty much dependency free. StructArrays seems to leak to some weird data stuff... |
Your currently just have
I feel like it might be worth it to just add a dependancy on StructArrays.jl, which imo should really be a baked in part of Julia's array interface.
The text was updated successfully, but these errors were encountered: