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 857eef4 commit 03bfc61Copy full SHA for 03bfc61
src/Xsum.jl
@@ -57,7 +57,7 @@ result. Both real and complex sums are supported.
57
"""
58
function xsum(itr)
59
i = iterate(itr)
60
- if isnothing(i)
+ if i === nothing
61
zero = Base.mapreduce_empty_iter(identity, +, itr, Base.IteratorEltype(itr))
62
return zero isa Real ? Float64(zero) : zero isa Complex ? ComplexF64(zero) : zero
63
end
0 commit comments