Skip to content

Commit 196ecd7

Browse files
Add missing Array conversion method
Fixes SciML/DiffEqFlux.jl#608
1 parent 0c2a5e0 commit 196ecd7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RecursiveArrayTools"
22
uuid = "731186ca-8d62-57ce-b412-fbd966d074cd"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "2.17.1"
4+
version = "2.17.2"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/vector_of_array.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ function Base.Array(VA::AbstractVectorOfArray)
3030
vecs = vec.(VA.u)
3131
Array(reshape(reduce(hcat,vecs),size(VA.u[1])...,length(VA.u)))
3232
end
33+
function Base.Array{U}(VA::AbstractVectorOfArray) where U
34+
vecs = vec.(VA.u)
35+
Array(reshape(reduce(hcat,vecs),size(VA.u[1])...,length(VA.u)))
36+
end
3337

3438
VectorOfArray(vec::AbstractVector{T}, ::NTuple{N}) where {T, N} = VectorOfArray{eltype(T), N, typeof(vec)}(vec)
3539
# Assume that the first element is representative of all other elements

0 commit comments

Comments
 (0)