diff options
author | Alan McIntyre <alan.mcintyre@local> | 2008-07-09 20:49:40 +0000 |
---|---|---|
committer | Alan McIntyre <alan.mcintyre@local> | 2008-07-09 20:49:40 +0000 |
commit | 7895d91a8328e9b3f8bfb7bba1fb7f8302adde51 (patch) | |
tree | 8ee9da69848cb7cc4915cb7bef11a8d85f5e45fc /numpy/lib/index_tricks.py | |
parent | a38f52777b28f91f73022b49a7d7000592dfd092 (diff) | |
download | numpy-7895d91a8328e9b3f8bfb7bba1fb7f8302adde51.tar.gz |
Make doctests pass under new execution context.
Diffstat (limited to 'numpy/lib/index_tricks.py')
-rw-r--r-- | numpy/lib/index_tricks.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py index 4d82161bd..b0e5822fe 100644 --- a/numpy/lib/index_tricks.py +++ b/numpy/lib/index_tricks.py @@ -102,7 +102,7 @@ class nd_grid(object): Examples -------- - >>> mgrid = nd_grid() + >>> mgrid = np.nd_grid() >>> mgrid[0:5,0:5] array([[[0, 0, 0, 0, 0], [1, 1, 1, 1, 1], @@ -319,7 +319,7 @@ class RClass(AxisConcatenator): """Translates slice objects to concatenation along the first axis. For example: - >>> r_[array([1,2,3]), 0, 0, array([4,5,6])] + >>> np.r_[array([1,2,3]), 0, 0, 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: - >>> c_[array([[1,2,3]]), 0, 0, array([[4,5,6]])] + >>> np.c_[array([[1,2,3]]), 0, 0, array([[4,5,6]])] array([1, 2, 3, 0, 0, 4, 5, 6]) """ def __init__(self): @@ -345,8 +345,8 @@ class ndenumerate(object): A simple nd index iterator over an array. Example: - >>> a = array([[1,2],[3,4]]) - >>> for index, x in ndenumerate(a): + >>> a = np.array([[1,2],[3,4]]) + >>> for index, x in np.ndenumerate(a): ... print index, x (0, 0) 1 (0, 1) 2 @@ -369,7 +369,7 @@ class ndindex(object): will then return an N-dimensional counter. Example: - >>> for index in ndindex(3,2,1): + >>> for index in np.ndindex(3,2,1): ... print index (0, 0, 0) (0, 1, 0) |