Skip to content

Commit 6cf55aa

Browse files
committed
[ci skip]
Revert back to calling Broadcast.combine_styles twice.
1 parent 35638c7 commit 6cf55aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

base/sparse/higherorderfns.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ end
9494
broadcast(f::Tf, A::SparseVector) where {Tf} = _noshapecheck_map(f, A)
9595
broadcast(f::Tf, A::SparseMatrixCSC) where {Tf} = _noshapecheck_map(f, A)
9696

97-
@inline function broadcast!(f::Tf, C::SparseVecOrMat, ::BroadcastStyle) where Tf
97+
@inline function broadcast!(f::Tf, C::SparseVecOrMat, ::Void) where Tf
9898
isempty(C) && return _finishempty!(C)
9999
fofnoargs = f()
100100
if _iszero(fofnoargs) # f() is zero, so empty C
@@ -107,7 +107,7 @@ broadcast(f::Tf, A::SparseMatrixCSC) where {Tf} = _noshapecheck_map(f, A)
107107
end
108108
return C
109109
end
110-
@inline function broadcast!(f::Tf, dest::SparseVecOrMat, style::BroadcastStyle, As::Vararg{Any,N}) where {Tf,N}
110+
@inline function broadcast!(f::Tf, dest::SparseVecOrMat, ::Void, As::Vararg{Any,N}) where {Tf,N}
111111
if f isa typeof(identity) && N == 1
112112
A = As[1]
113113
if A isa Number
@@ -116,7 +116,7 @@ end
116116
return copy!(dest, A)
117117
end
118118
end
119-
return spbroadcast_args!(f, dest, style, As...)
119+
return spbroadcast_args!(f, dest, Broadcast.combine_styles(As...), As...)
120120
end
121121

122122
# the following three similar defs are necessary for type stability in the mixed vector/matrix case

0 commit comments

Comments
 (0)