We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the case below, how do I get the range of indices spanned by x.a?
x.a
x = (; a = ones(2), b = ones(2)) |> ComponentArray idx_a = ?? # want 1:2
The text was updated successfully, but these errors were encountered:
@jonniedie is that possible? TIA
Sorry, something went wrong.
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
No branches or pull requests
In the case below, how do I get the range of indices spanned by
x.a
?The text was updated successfully, but these errors were encountered: