Skip to content

Commit bd2b0a4

Browse files
committed
generic recursive zero value
1 parent a10cb5b commit bd2b0a4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/linalg.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,8 +656,7 @@ function dot(x::AbstractSparseVector, D::Diagonal, y::AbstractSparseVector)
656656
ynzind = nonzeroinds(y)
657657
xnzval = nonzeros(x)
658658
ynzval = nonzeros(y)
659-
s = zero(Base.promote_eltype(x, D, y))
660-
659+
s = zero(typeof(dot(first(x), first(D), first(y))))
661660
if isempty(xnzind) || isempty(ynzind)
662661
return s
663662
end

0 commit comments

Comments
 (0)