diff options
author | Tyler Reddy <tyler.je.reddy@gmail.com> | 2018-12-04 12:17:59 -0800 |
---|---|---|
committer | Tyler Reddy <tyler.je.reddy@gmail.com> | 2018-12-14 10:14:05 -0800 |
commit | 19784177a61de75927a4934fd4cdd91afbb5b35c (patch) | |
tree | cf9f88bf968e48d0eebd2cd523cefd2bd4c2fd51 /numpy/core/fromnumeric.py | |
parent | 250861059b106371cb232456eeccd6d9e97d8f00 (diff) | |
download | numpy-19784177a61de75927a4934fd4cdd91afbb5b35c.tar.gz |
MAINT: address several reviewer comments
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 33ecd6905..575e0a8ef 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -2240,13 +2240,10 @@ def all(a, axis=None, out=None, keepdims=np._NoValue): >>> np.all([1.0, np.nan]) True - >>> o=np.array([False]) + >>> o=np.array(False) >>> z=np.all([-1, 4, 5], out=o) - Traceback (most recent call last): - ... - ValueError: output parameter for reduction operation logical_and has too many dimensions - >>> id(z), id(o), z # doctest: +SKIP - (28293632, 28293632, array([ True])) + >>> id(z), id(o), z + (28293632, 28293632, array([ True])) # may vary """ return _wrapreduction(a, np.logical_and, 'all', axis, None, out, keepdims=keepdims) @@ -2732,7 +2729,7 @@ def prod(a, axis=None, dtype=None, out=None, keepdims=np._NoValue, initial=np._N >>> x = np.array([536870910, 536870910, 536870910, 536870910]) >>> np.prod(x) - 6917529010461212688 # may vary + 16 # may vary The product of an empty array is the neutral element 1: |