Skip to content

Commit 994808f

Browse files
Merge pull request #62 from JuliaDiffEq/ChrisRackauckas-patch-1
Fix #61 return dest from `copyto!`
2 parents 802d6a7 + 02ea06b commit 994808f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/array_partition.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ function Base.copyto!(dest::Array,A::ArrayPartition)
110110
dest[cur:(cur+length(A.x[i])-1)] .= A.x[i]
111111
cur += length(A.x[i])
112112
end
113+
dest
113114
end
114115

115116
function Base.copyto!(A::ArrayPartition,src::ArrayPartition)
@@ -119,6 +120,7 @@ function Base.copyto!(A::ArrayPartition,src::ArrayPartition)
119120
A.x[i] .= @view(src[cur:(cur+length(A.x[i])-1)])
120121
cur += length(A.x[i])
121122
end
123+
dest
122124
end
123125

124126
## indexing

0 commit comments

Comments
 (0)