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?
Wiht, say, floats, I can do
But if I do instead:
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
ArrayPartitionwithout running into this problem?