From 1a537af02044b05c9e394e85a97ac8cf30132ebd Mon Sep 17 00:00:00 2001 From: Wirawan Purwanto Date: Fri, 22 May 2015 23:59:01 -0400 Subject: [PATCH] * Dialect correction: "x == None" -> "x is None". --- math/stats/avg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/math/stats/avg.py b/math/stats/avg.py index bdbcca0..c97750f 100644 --- a/math/stats/avg.py +++ b/math/stats/avg.py @@ -44,11 +44,11 @@ def get_sample_stats(a, weights=None, result=None): """ from numpy import asarray, count_nonzero, product, sqrt, sum, nan a = asarray(a) - if result == None: + if result is None: r = weighted_stats() else: r = result - if weights == None: + if weights is None: r.s0 = product(a.shape) r.s1 = sum(a) r.s2 = sum(a**2)