SciML/RecursiveArrayTools.jl

Prepending/appending a list of ArrayPartition

olivierverdier opened this issue · 1 comments

Wiht, say, floats, I can do

L = [1]
prepend!(L, 0) # now L == [0,1]

But if I do instead:

a = (rand(5), rand(5))
pA = ArrayPartition(a)
pB = ArrayPartition(a)
L = [pA]
prepend!(L, pB)

I get an error, namely Cannot `convert` an object of type Float64 to an object of type ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}}.

What is going on? Is it the expected behaviour, and if it is, how to properly use vectors of ArrayPartition without running into this problem?

Mmh, sorry, I see now that it is an issue with any AbstractArray.