Skip to content

Commit da37b6f

Browse files
committed
Fix similar for specific size
Signed-off-by: ErikQQY <[email protected]>
1 parent e8f1fc3 commit da37b6f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/vector_of_array.jl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ Base.eltype(::Type{<:AbstractVectorOfArray{T}}) where {T} = T
718718

719719
@inline function Base.similar(VA::AbstractVectorOfArray, args...)
720720
if args[end] isa Type
721-
return return Base.similar(eltype(VA)[], args..., size(VA))
721+
return Base.similar(eltype(VA)[], args..., size(VA))
722722
else
723723
return Base.similar(eltype(VA)[], args...)
724724
end
@@ -742,11 +742,6 @@ end
742742
end
743743
end
744744

745-
@inline function Base.similar(VA::VectorOfArray{T, N, AT},
746-
dims::Tuple) where {T, N, AT <: AbstractArray{<:AbstractArray{T}}}
747-
VectorOfArray(similar(VA.u, dims))
748-
end
749-
750745
# fill!
751746
# For DiffEqArray it ignores ts and fills only u
752747
function Base.fill!(VA::AbstractVectorOfArray, x)

0 commit comments

Comments
 (0)