Skip to content

Commit 9c4a4f4

Browse files
fix arraypartition broadcast
1 parent 9824a94 commit 9c4a4f4

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/array_partition.jl

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ Base.Broadcast.promote_containertype(::Type{Array}, ::Type{ArrayPartition}) = Ar
242242
N = npartitions(as...)
243243

244244
# broadcast partitions separately
245-
expr = :(@show "here!"; broadcast(f,
245+
expr = :(broadcast(f,
246246
# index partitions
247247
$((as[d] <: ArrayPartition ? :(as[$d].x[i]) : :(as[$d])
248248
for d in 1:length(as))...)))
@@ -267,25 +267,6 @@ end
267267
end
268268
end
269269

270-
@generated function Base.broadcast!(f, ::Type{ArrayPartition}, ::Type,
271-
dest::Array, as...)
272-
# common number of partitions
273-
N = npartitions(dest, as...)
274-
275-
# broadcast partitions separately
276-
quote
277-
@show "here"
278-
@show dest
279-
for i in 1:$N
280-
broadcast!(f, dest.x[i],
281-
# index partitions
282-
$((as[d] <: ArrayPartition ? :(as[$d].x[i]) : :(as[$d])
283-
for d in 1:length(as))...))
284-
end
285-
dest
286-
end
287-
end
288-
289270
## utils
290271

291272
"""

0 commit comments

Comments
 (0)