We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21408fd commit 07f3edeCopy full SHA for 07f3ede
src/vector_of_array.jl
@@ -94,7 +94,11 @@ recursivecopy(VA::VectorOfArray) = VectorOfArray(copy.(VA.u))
94
# For DiffEqArray it ignores ts and fills only u
95
function Base.fill!(VA::AbstractVectorOfArray, x)
96
for i in eachindex(VA)
97
- fill!(VA[i], x)
+ if VA[i] isa AbstractArray
98
+ fill!(VA[i], x)
99
+ else
100
+ VA[i] = x
101
+ end
102
end
103
return VA
104
@@ -171,7 +175,11 @@ end
171
175
bc = Broadcast.flatten(bc)
172
176
N = narrays(bc)
173
177
@inbounds for i in 1:N
174
- copyto!(dest[i], unpack_voa(bc, i))
178
+ if dest[i] isa AbstractArray
179
+ copyto!(dest[i], unpack_voa(bc, i))
180
181
+ dest[i] = copy(unpack_voa(bc, i))
182
183
184
dest
185
0 commit comments