From da37b6f474b84ede79e50da5e0022b3480ff3255 Mon Sep 17 00:00:00 2001 From: ErikQQY <2283984853@qq.com> Date: Thu, 12 Sep 2024 15:29:13 +0800 Subject: [PATCH] Fix similar for specific size Signed-off-by: ErikQQY <2283984853@qq.com> --- src/vector_of_array.jl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/vector_of_array.jl b/src/vector_of_array.jl index 506c0a81..9271eead 100644 --- a/src/vector_of_array.jl +++ b/src/vector_of_array.jl @@ -718,7 +718,7 @@ Base.eltype(::Type{<:AbstractVectorOfArray{T}}) where {T} = T @inline function Base.similar(VA::AbstractVectorOfArray, args...) if args[end] isa Type - return return Base.similar(eltype(VA)[], args..., size(VA)) + return Base.similar(eltype(VA)[], args..., size(VA)) else return Base.similar(eltype(VA)[], args...) end @@ -742,11 +742,6 @@ end end end -@inline function Base.similar(VA::VectorOfArray{T, N, AT}, - dims::Tuple) where {T, N, AT <: AbstractArray{<:AbstractArray{T}}} - VectorOfArray(similar(VA.u, dims)) -end - # fill! # For DiffEqArray it ignores ts and fills only u function Base.fill!(VA::AbstractVectorOfArray, x)