summaryrefslogtreecommitdiff
path: root/numpy/lib/twodim_base.py
diff options
context:
space:
mode:
authorAlan McIntyre <alan.mcintyre@local>2008-07-05 14:26:16 +0000
committerAlan McIntyre <alan.mcintyre@local>2008-07-05 14:26:16 +0000
commit36e02207c1a82fe669531dd24ec799eca2989c80 (patch)
tree104f800d6800c4a01a0aecac323a8a70517aa94b /numpy/lib/twodim_base.py
parentf07e385b69ee59ef6abe05f164138dc6a7279291 (diff)
downloadnumpy-36e02207c1a82fe669531dd24ec799eca2989c80.tar.gz
Use the implicit "import numpy as np" made available to all doctests instead
of explicit imports or dependency on the local scope where the doctest is defined..
Diffstat (limited to 'numpy/lib/twodim_base.py')
-rw-r--r--numpy/lib/twodim_base.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/lib/twodim_base.py b/numpy/lib/twodim_base.py
index 44082521c..ab1e5fcf0 100644
--- a/numpy/lib/twodim_base.py
+++ b/numpy/lib/twodim_base.py
@@ -88,13 +88,13 @@ def diagflat(v,k=0):
Examples
--------
- >>> diagflat([[1,2],[3,4]]])
+ >>> np.diagflat([[1,2],[3,4]])
array([[1, 0, 0, 0],
[0, 2, 0, 0],
[0, 0, 3, 0],
[0, 0, 0, 4]])
- >>> diagflat([1,2], 1)
+ >>> np.diagflat([1,2], 1)
array([[0, 1, 0],
[0, 0, 2],
[0, 0, 0]])
@@ -180,8 +180,8 @@ def histogram2d(x,y, bins=10, range=None, normed=False, weights=None):
- `xedges, yedges` : Arrays defining the bin edges.
Example:
- >>> x = random.randn(100,2)
- >>> hist2d, xedges, yedges = histogram2d(x, bins = (6, 7))
+ >>> x = np.random.randn(100,2)
+ >>> hist2d, xedges, yedges = np.lib.histogram2d(x, bins = (6, 7))
:SeeAlso: histogramdd
"""