Skip to content

Fix boolean mask indexing - #183

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ma-sadeghi:fix-mask-indexing
Jan 4, 2022
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ma-sadeghi:fix-mask-indexing

Conversation

@ma-sadeghi

Copy link
Copy Markdown
Contributor

No description provided.

@ma-sadeghi

Copy link
Copy Markdown
Contributor Author

@ChrisRackauckas Could you please take a look? Also, does the GPU CI need to be manually triggered or is it part Github Actions CIs?

@ChrisRackauckas

Copy link
Copy Markdown
Member

oh, BuildKite must not trigger on outside PRs...

@ChrisRackauckas

Copy link
Copy Markdown
Member

I'm going rogue. I'll merge and see.

@ChrisRackauckas
ChrisRackauckas merged commit d846291 into SciML:master Jan 4, 2022
@ma-sadeghi
ma-sadeghi deleted the fix-mask-indexing branch January 4, 2022 23:42
@ma-sadeghi

Copy link
Copy Markdown
Contributor Author

@ChrisRackauckas Seems to have worked! A minor issue that I forgot to delete line 80 (which does nothing!) 😢 But, I guess should be fine (?).

Base.@propagate_inbounds function Base.getindex(A::AbstractVectorOfArray{T, N},
I::AbstractArray{Bool},J::Colon...) where {T, N}
@assert length(J) == ndims(A.u[1])+1-ndims(I)
@assert size(I) == size(A)[1:ndims(A)-length(J)]
vecs = vec.(A.u)
return A[repeat([:], length(size(A)))...][I,J...]
end

@ChrisRackauckas

Copy link
Copy Markdown
Member

I just did a small commit removing it. No worries.

Comment thread src/vector_of_array.jl
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.

3 participants