-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
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
Update vector_of_array.jl #355
Conversation
Oops this might violate the copying semantics of getindex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copying isn't really an issue here, since we can't avoid it. However, I'd recommend using the Adapt.adapt(...)
wrapper instead of Array
. That way the output type matches the type of the contained arrays.
I meant to say that |
I think it copies, and anyway |
The following method of
I'll probably keep the original method and add one with numeric elements that forwards the indices to the inner array. |
I updated my pr to just add a new method which will fix the broken case. I also rebased onto the main branch. I hope this looks good. |
Fix #354
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.