summaryrefslogtreecommitdiff
path: root/numpy/lib/index_tricks.py
diff options
context:
space:
mode:
authorAlan McIntyre <alan.mcintyre@local>2008-07-13 21:43:50 +0000
committerAlan McIntyre <alan.mcintyre@local>2008-07-13 21:43:50 +0000
commitda2a99485f401a0b09b6fe47ec1f23190d0259bf (patch)
tree82dc0abe753d45c089e9936761e047323a7fb780 /numpy/lib/index_tricks.py
parent5f1b347d807b713292a5771b5bf086265848faf0 (diff)
downloadnumpy-da2a99485f401a0b09b6fe47ec1f23190d0259bf.tar.gz
Fix doctests to run properly under new execution context.
Diffstat (limited to 'numpy/lib/index_tricks.py')
-rw-r--r--numpy/lib/index_tricks.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py
index b0e5822fe..2024584d4 100644
--- a/numpy/lib/index_tricks.py
+++ b/numpy/lib/index_tricks.py
@@ -102,7 +102,7 @@ class nd_grid(object):
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 @@ class nd_grid(object):
[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 @@ class RClass(AxisConcatenator):
"""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 @@ class CClass(AxisConcatenator):
"""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):