Skip to content

Commit

Permalink
Convert to the right type in similar
Browse files Browse the repository at this point in the history
Signed-off-by: ErikQQY <[email protected]>
  • Loading branch information
ErikQQY committed Sep 11, 2024
1 parent fdd3e66 commit c87bc1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vector_of_array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ function Base.similar(vec::VectorOfArray{
end

@inline function Base.similar(VA::VectorOfArray{T1, N, AT}, ::Type{T2}) where {T1, T2, N, AT <: AbstractArray{<:AbstractArray{T1}}}
eltype(VA.u) <: Vector ? VectorOfArray(similar(VA.u, Vector{T1})) : VectorOfArray(similar(VA.u, Matrix{T1}))
eltype(VA.u) <: Vector ? VectorOfArray(similar(VA.u, Vector{T2})) : VectorOfArray(similar(VA.u, Matrix{T2}))
end

@inline function Base.similar(VA::VectorOfArray, dims::N) where {N}
Expand Down

0 comments on commit c87bc1c

Please sign in to comment.