* Dialect correction: "x == None" -> "x is None".

This commit is contained in:
Wirawan Purwanto
2015-05-22 23:59:01 -04:00
parent e46fcec698
commit 1a537af020

View File

@@ -44,11 +44,11 @@ def get_sample_stats(a, weights=None, result=None):
""" """
from numpy import asarray, count_nonzero, product, sqrt, sum, nan from numpy import asarray, count_nonzero, product, sqrt, sum, nan
a = asarray(a) a = asarray(a)
if result == None: if result is None:
r = weighted_stats() r = weighted_stats()
else: else:
r = result r = result
if weights == None: if weights is None:
r.s0 = product(a.shape) r.s0 = product(a.shape)
r.s1 = sum(a) r.s1 = sum(a)
r.s2 = sum(a**2) r.s2 = sum(a**2)