Skip to content

Commit 9d2a40e

Browse files
number exception
1 parent 9eaea85 commit 9d2a40e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/RecursiveArrayTools.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ module RecursiveArrayTools
4545
recursivecopy!(a[i],x)
4646
end
4747
else
48-
if eltype(x) <: Number && typeof(x) <: Array
48+
if eltype(x) <: Number && (typeof(x) <: Array || typeof(x) <: Number)
4949
# Have to check that it's <: Array or can have problems
5050
# with abstract arrays like MultiScaleModels.
51+
# Have to check <: Number since it could just be a number...
5152
push!(a,copy(x))
5253
else
5354
push!(a,deepcopy(x))

0 commit comments

Comments
 (0)