summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan McIntyre <alan.mcintyre@local>2008-09-13 02:53:53 +0000
committerAlan McIntyre <alan.mcintyre@local>2008-09-13 02:53:53 +0000
commitb570fbbc488b4b9480fdf0f5df9fe7369af65d7c (patch)
tree16068bb6224e5c844953b729bf6e29d41de04989
parent212163e69adf725336ed73cea86fe7dc5f74ec27 (diff)
downloadnumpy-b570fbbc488b4b9480fdf0f5df9fe7369af65d7c.tar.gz
Fix failing doctests.
-rw-r--r--numpy/core/fromnumeric.py2
-rw-r--r--numpy/core/numeric.py4
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):