Skip to content

Commit 18c47f8

Browse files
simplified recursivecopy!
1 parent 22c18d8 commit 18c47f8

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/utils.jl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,12 @@ function recursivecopy{T<:AbstractArray,N}(a::AbstractArray{T,N})
66
[recursivecopy(x) for x in a]
77
end
88

9-
function recursivecopy!{T<:StaticArray,N}(b::AbstractArray{T,N},a::AbstractArray{T,N})
9+
function recursivecopy!{T<:SArray,N}(b::AbstractArray{T,N},a::AbstractArray{T,N})
1010
@inbounds for i in eachindex(a)
1111
b[i] = a[i]
1212
end
1313
end
1414

15-
function recursivecopy!{T<:MArray,N}(b::AbstractArray{T,N},a::AbstractArray{T,N})
16-
@inbounds for i in eachindex(a)
17-
recursivecopy!(b[i],a[i])
18-
end
19-
end
20-
2115
function recursivecopy!{T<:Number,N}(b::AbstractArray{T,N},a::AbstractArray{T,N})
2216
copy!(b,a)
2317
end

0 commit comments

Comments
 (0)