Skip to content

Commit ec1e144

Browse files
committed
Removed the Style from the unpacking of Broadcasted type to allow it to decide naturally which style it is
1 parent 734999e commit ec1e144

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/array_partition.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ _npartitions(args::Tuple{Any}) = npartitions(args[1])
304304
_npartitions(args::Tuple{}) = 0
305305

306306
# drop axes because it is easier to recompute
307-
@inline unpack(bc::Broadcast.Broadcasted{Style}, i) where Style = Broadcast.Broadcasted{Style}(bc.f, unpack_args(i, bc.args))
308-
@inline unpack(bc::Broadcast.Broadcasted{ArrayPartitionStyle{Style}}, i) where Style = Broadcast.Broadcasted{Style}(bc.f, unpack_args(i, bc.args))
307+
@inline unpack(bc::Broadcast.Broadcasted{Style}, i) where Style = Broadcast.Broadcasted(bc.f, unpack_args(i, bc.args))
308+
@inline unpack(bc::Broadcast.Broadcasted{ArrayPartitionStyle{Style}}, i) where Style = Broadcast.Broadcasted(bc.f, unpack_args(i, bc.args))
309309
unpack(x,::Any) = x
310310
unpack(x::ArrayPartition, i) = x.x[i]
311311

0 commit comments

Comments
 (0)