Skip to content

Commit 89383b4

Browse files
authored
Broaden vector eltype signature for push!
Pushing to `AbstractVectorOfArray` is currently limited to vectors with eltype `AbstractVector`, which seems likely to have been a too-restrictive oversight. This PR broadens the accepted eltype to `AbstractArray`.
1 parent e54db92 commit 89383b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vector_of_array.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Base.copy(VA::AbstractDiffEqArray) = typeof(VA)(
169169
)
170170
Base.copy(VA::AbstractVectorOfArray) = typeof(VA)(copy(VA.u))
171171
Base.sizehint!(VA::AbstractVectorOfArray{T, N}, i) where {T, N} = sizehint!(VA.u, i)
172-
Base.push!(VA::AbstractVectorOfArray{T, N}, new_item::AbstractVector) where {T, N} = push!(VA.u, new_item)
172+
Base.push!(VA::AbstractVectorOfArray{T, N}, new_item::AbstractArray) where {T, N} = push!(VA.u, new_item)
173173

174174
function Base.append!(VA::AbstractVectorOfArray{T, N}, new_item::AbstractVectorOfArray{T, N}) where {T, N}
175175
for item in copy(new_item)

0 commit comments

Comments
 (0)