Skip to content

Commit 2924afc

Browse files
Merge pull request #48 from devmotion/recursive_number
No deep copy for numbers
2 parents 63adb2a + d7ef7a4 commit 2924afc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/utils.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ function recursivecopy(a)
1010
deepcopy(a)
1111
end
1212

13+
recursivecopy(a::Number) = copy(a)
14+
1315
function recursivecopy(a::AbstractArray{T,N}) where {T<:Number,N}
1416
copy(a)
1517
end

0 commit comments

Comments
 (0)