summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/mathmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 8015a95..06a969c 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -2074,7 +2074,7 @@ vector_norm(Py_ssize_t n, double *vec, double max, int found_nan)
if (found_nan) {
return Py_NAN;
}
- if (max == 0.0 || n == 1) {
+ if (max == 0.0 || n <= 1) {
return max;
}
for (i=0 ; i < n ; i++) {