summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorEgor Klenin <yegorklenin@gmail.com>2017-03-20 16:26:59 +0300
committerEgor Klenin <yegorklenin@gmail.com>2017-03-21 22:07:38 +0300
commit9f7a9e00eec6f0a795c859ff8328a6b82603e506 (patch)
treeaa44a63a66c078c2fdd2d901a2cc402cab7455af /numpy/lib/function_base.py
parentbdbd774af41e1a3480f86da932d8875bcf8eb145 (diff)
downloadnumpy-9f7a9e00eec6f0a795c859ff8328a6b82603e506.tar.gz
DOC: Include np. prefix in meshgrid examples
Add "np." prefix to meshgrid calls for consistency
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 0903790bd..cc0e8feeb 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -4601,12 +4601,12 @@ def meshgrid(*xi, **kwargs):
'xy' indexing and (M, N, P) for 'ij' indexing. The difference is
illustrated by the following code snippet::
- xv, yv = meshgrid(x, y, sparse=False, indexing='ij')
+ xv, yv = np.meshgrid(x, y, sparse=False, indexing='ij')
for i in range(nx):
for j in range(ny):
# treat xv[i,j], yv[i,j]
- xv, yv = meshgrid(x, y, sparse=False, indexing='xy')
+ xv, yv = np.meshgrid(x, y, sparse=False, indexing='xy')
for i in range(nx):
for j in range(ny):
# treat xv[j,i], yv[j,i]
@@ -4625,14 +4625,14 @@ def meshgrid(*xi, **kwargs):
>>> nx, ny = (3, 2)
>>> x = np.linspace(0, 1, nx)
>>> y = np.linspace(0, 1, ny)
- >>> xv, yv = meshgrid(x, y)
+ >>> xv, yv = np.meshgrid(x, y)
>>> xv
array([[ 0. , 0.5, 1. ],
[ 0. , 0.5, 1. ]])
>>> yv
array([[ 0., 0., 0.],
[ 1., 1., 1.]])
- >>> xv, yv = meshgrid(x, y, sparse=True) # make sparse output arrays
+ >>> xv, yv = np.meshgrid(x, y, sparse=True) # make sparse output arrays
>>> xv
array([[ 0. , 0.5, 1. ]])
>>> yv
@@ -4643,7 +4643,7 @@ def meshgrid(*xi, **kwargs):
>>> x = np.arange(-5, 5, 0.1)
>>> y = np.arange(-5, 5, 0.1)
- >>> xx, yy = meshgrid(x, y, sparse=True)
+ >>> xx, yy = np.meshgrid(x, y, sparse=True)
>>> z = np.sin(xx**2 + yy**2) / (xx**2 + yy**2)
>>> h = plt.contourf(x,y,z)