Skip to content

Commit

Permalink
Fix similar for specific size
Browse files Browse the repository at this point in the history
Signed-off-by: ErikQQY <[email protected]>
  • Loading branch information
ErikQQY committed Sep 12, 2024
1 parent e8f1fc3 commit da37b6f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/vector_of_array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit da37b6f

Please sign in to comment.