I have a vector with elements of possibly different types (but homogeneous) and the same length (>1e8).
Example:
julia> data
3-element Vector{Any}:
[0.7947257509914385, 0.938439282086563, 0.7825664679861779, 0.9622100725905216, 0.4505364179186473]
[0.05038215152695846, 0.23018482446598987, 0.3575198683096761, 0.5687945898953082, 0.45331859880110126]
[0.584780363134745, 0.7596965009119068, 0.011245396510286998, 0.9853654421407447, 0.6357566746779792]
and corresponding field names “:x”, “:y”, “:z”,
How to transform this into an array of named tuples (thus also type-stable),
such that sdata[2].x == 0.938439282086563
The single element can be accessed by
data[1][2], but : combinations always yield a 5-element vector.
Found this similar thread, but not sure if applicable.