Open vpuri3 opened 8 months ago
@jonniedie is that possible? TIA
It's a little clunky, but you can do
only(getaxes(x))[:a].idx
Thanks, that works. Is there a similar way to get the global indices of nested arrays? eg.
ca = (; a = ones(2), b = (; x = 2 * ones(2), y = 3 * ones(2))) |> ComponentArray
idx_b_x = getindices(ca.b.x) # want 3:4
In the case below, how do I get the range of indices spanned by
x.a
?