diff options
-rw-r--r-- | numpy/core/fromnumeric.py | 2 | ||||
-rw-r--r-- | numpy/core/numeric.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 073614495..f3e9f9b5d 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -1617,12 +1617,14 @@ def prod(a, axis=None, dtype=None, out=None): >>> x = np.array([1, 2, 3], dtype=np.uint8) >>> np.prod(x).dtype == np.uint + True If `x` is of a signed integer type, then the output type is the default platform integer: >>> x = np.array([1, 2, 3], dtype=np.int8) >>> np.prod(x).dtype == np.int + True """ try: diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 96fc1ada0..a6570c0c0 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -765,7 +765,7 @@ def tensordot(a, b, axes=2): >>> b = np.arange(24.).reshape(4,3,2) >>> c = np.tensordot(a,b, axes=([1,0],[0,1])) >>> c.shape - (5,2) + (5, 2) >>> c array([[ 4400., 4730.], [ 4532., 4874.], @@ -774,7 +774,7 @@ def tensordot(a, b, axes=2): [ 4928., 5306.]]) >>> # A slower but equivalent way of computing the same... - >>> c = zeros((5,2)) + >>> c = np.zeros((5,2)) >>> for i in range(5): ... for j in range(2): ... for k in range(3): |