[Numpy-svn] r5806 - trunk/numpy/core

numpy-svn at scipy.org numpy-svn at scipy.org
Fri Sep 12 22:53:56 EDT 2008


Author: alan.mcintyre
Date: 2008-09-12 21:53:53 -0500 (Fri, 12 Sep 2008)
New Revision: 5806

Modified:
   trunk/numpy/core/fromnumeric.py
   trunk/numpy/core/numeric.py
Log:
Fix failing doctests.


Modified: trunk/numpy/core/fromnumeric.py
===================================================================
--- trunk/numpy/core/fromnumeric.py	2008-09-12 19:23:20 UTC (rev 5805)
+++ trunk/numpy/core/fromnumeric.py	2008-09-13 02:53:53 UTC (rev 5806)
@@ -1617,12 +1617,14 @@
 
     >>> 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:

Modified: trunk/numpy/core/numeric.py
===================================================================
--- trunk/numpy/core/numeric.py	2008-09-12 19:23:20 UTC (rev 5805)
+++ trunk/numpy/core/numeric.py	2008-09-13 02:53:53 UTC (rev 5806)
@@ -765,7 +765,7 @@
     >>> 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 @@
            [ 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):




More information about the Numpy-svn mailing list