mirror of https://github.com/pyodide/pyodide.git
25 lines
830 B
Diff
25 lines
830 B
Diff
This fix for Python 3.8 warnings is already applied in upstream and
|
|
should probably be removed after next mpmath release.
|
|
|
|
diff --git a/mpmath/ctx_mp_python.py b/mpmath/ctx_mp_python.py
|
|
--- a/mpmath/ctx_mp_python.py
|
|
+++ b/mpmath/ctx_mp_python.py
|
|
@@ -889,7 +889,7 @@ def fsum(ctx, terms, absolute=False, squared=False):
|
|
s = ctx.make_mpc((s, mpf_sum(imag, prec, rnd)))
|
|
else:
|
|
s = ctx.make_mpf(s)
|
|
- if other is 0:
|
|
+ if other == 0:
|
|
return s
|
|
else:
|
|
return s + other
|
|
@@ -983,7 +983,7 @@ def fdot(ctx, A, B=None, conjugate=False):
|
|
s = ctx.make_mpc((s, mpf_sum(imag, prec, rnd)))
|
|
else:
|
|
s = ctx.make_mpf(s)
|
|
- if other is 0:
|
|
+ if other == 0:
|
|
return s
|
|
else:
|
|
return s + other
|