Skip to content

Specialize getindex for indexing VectorOfArray with mask and colon#181

Merged
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ma-sadeghi:mask_idx
Jan 4, 2022
Merged

Specialize getindex for indexing VectorOfArray with mask and colon#181
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ma-sadeghi:mask_idx

Conversation

@ma-sadeghi

Copy link
Copy Markdown
Contributor

Fixes #180

@ma-sadeghi

ma-sadeghi commented Jan 4, 2022

Copy link
Copy Markdown
Contributor Author

Indexing with a single mask in between colons is still not supported, for instance: A[:, m, :, :] for a 4D VectorOfArray as I don't know how to account for that (I know how to deal with A[:, m, :, :] in particular, but don't know how to generalize it to the case where we might have multiple masks in between colons, for instance: A[:, m1, :, m2, :], not sure how practical this kind of indexing is, so maybe not even worth it!).

Comment thread src/vector_of_array.jl Outdated
@ChrisRackauckas ChrisRackauckas merged commit 333ea7d into SciML:master Jan 4, 2022
@ma-sadeghi ma-sadeghi deleted the mask_idx branch January 4, 2022 08:25
@ma-sadeghi

Copy link
Copy Markdown
Contributor Author

@ChrisRackauckas Thanks for your review. I just tried it out and I still get the scalar indexing error, which seems to be coming from this part: reduce(hcat,vecs[I]), and more specifically the vecs[I] part.

@ChrisRackauckas

Copy link
Copy Markdown
Member

Yeah it looks like the tests went brain-dead and didn't run that one, so I merged accidentally just seeing that all tests passed 😰 .

@ChrisRackauckas

Copy link
Copy Markdown
Member

#182

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

Successfully merging this pull request may close these issues.

Indexing VectorOfArrays using boolean masks throws warning

2 participants