[Numpy-svn] r5403 - trunk/numpy/lib

numpy-svn@scip... numpy-svn@scip...
Sun Jul 13 16:43:54 CDT 2008


Author: alan.mcintyre
Date: 2008-07-13 16:43:50 -0500 (Sun, 13 Jul 2008)
New Revision: 5403

Modified:
   trunk/numpy/lib/index_tricks.py
Log:
Fix doctests to run properly under new execution context.


Modified: trunk/numpy/lib/index_tricks.py
===================================================================
--- trunk/numpy/lib/index_tricks.py	2008-07-13 21:42:52 UTC (rev 5402)
+++ trunk/numpy/lib/index_tricks.py	2008-07-13 21:43:50 UTC (rev 5403)
@@ -102,7 +102,7 @@
 
     Examples
     --------
-    >>> mgrid = np.nd_grid()
+    >>> mgrid = np.lib.index_tricks.nd_grid()
     >>> mgrid[0:5,0:5]
     array([[[0, 0, 0, 0, 0],
             [1, 1, 1, 1, 1],
@@ -117,7 +117,7 @@
             [0, 1, 2, 3, 4]]])
     >>> mgrid[-1:1:5j]
     array([-1. , -0.5,  0. ,  0.5,  1. ])
-    >>> ogrid = nd_grid(sparse=True)
+    >>> ogrid = np.lib.index_tricks.nd_grid(sparse=True)
     >>> ogrid[0:5,0:5]
     [array([[0],
             [1],
@@ -319,7 +319,7 @@
     """Translates slice objects to concatenation along the first axis.
 
     For example:
-    >>> np.r_[array([1,2,3]), 0, 0, array([4,5,6])]
+    >>> np.r_[np.array([1,2,3]), 0, 0, np.array([4,5,6])]
     array([1, 2, 3, 0, 0, 4, 5, 6])
 
     """
@@ -332,7 +332,7 @@
     """Translates slice objects to concatenation along the second axis.
 
     For example:
-    >>> np.c_[array([[1,2,3]]), 0, 0, array([[4,5,6]])]
+    >>> np.c_[np.array([[1,2,3]]), 0, 0, np.array([[4,5,6]])]
     array([1, 2, 3, 0, 0, 4, 5, 6])
     """
     def __init__(self):



More information about the Numpy-svn mailing list