Closed lxvm closed 7 months ago
Oops this might violate the copying semantics of getindex
I meant to say that getindex
must copy, but Array
may not. Is Adapt.adapt
required to copy?
I think it copies, and anyway Array(::VectorOfArray)
will copy anyway?
The following method of Array
doesn't copy: https://github.com/SciML/RecursiveArrayTools.jl/blob/351cb407e82a516be1269fa5408e45cc3b672a31/src/vector_of_array.jl#L89
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
Additional context
Add any other context about the problem here.