Skip to content

Commit

Permalink
number exception
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Dec 5, 2016
1 parent 9eaea85 commit 9d2a40e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/RecursiveArrayTools.jl
Expand Up @@ -45,9 +45,10 @@ module RecursiveArrayTools
recursivecopy!(a[i],x)
end
else
if eltype(x) <: Number && typeof(x) <: Array
if eltype(x) <: Number && (typeof(x) <: Array || typeof(x) <: Number)
# Have to check that it's <: Array or can have problems
# with abstract arrays like MultiScaleModels.
# Have to check <: Number since it could just be a number...
push!(a,copy(x))
else
push!(a,deepcopy(x))
Expand Down

0 comments on commit 9d2a40e

Please sign in to comment.