mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
Minor improvement to code clarity (GH-9036)
Make it clear that the n==0 case is included. Otherwise, you have to know that max==0.0 whenever n==0.
This commit is contained in:
parent
98b976a2f8
commit
f326714426
1 changed files with 1 additions and 1 deletions
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue