similar(v) for v::VectorOfArray{T, N, A} gives you an instance of AbstractArray{T,N} instead of another VectorOfArray.
MWE:
a = VectorOfArray([[1,2,3,4,5],[6,7,8,9,10]])
similar(a)
gives you a 5×2 Array{Int64,2}.
I guess you can write something like
@inline Base.similar(VA::AbstractVectorOfArray) = VectorOfArray([similar(VA[i]) for i in eachindex(VA)])
to deal with this problem.
similar(v)forv::VectorOfArray{T, N, A}gives you an instance ofAbstractArray{T,N}instead of anotherVectorOfArray.MWE:
gives you a
5×2 Array{Int64,2}.I guess you can write something like
to deal with this problem.