[Numpy-svn] r5372 - trunk/numpy/doc

numpy-svn@scip... numpy-svn@scip...
Wed Jul 9 03:50:00 CDT 2008


Author: stefan
Date: 2008-07-09 03:49:28 -0500 (Wed, 09 Jul 2008)
New Revision: 5372

Modified:
   trunk/numpy/doc/EXAMPLE_DOCSTRING.txt
Log:
Fix example docstring.


Modified: trunk/numpy/doc/EXAMPLE_DOCSTRING.txt
===================================================================
--- trunk/numpy/doc/EXAMPLE_DOCSTRING.txt	2008-07-09 08:13:18 UTC (rev 5371)
+++ trunk/numpy/doc/EXAMPLE_DOCSTRING.txt	2008-07-09 08:49:28 UTC (rev 5372)
@@ -72,9 +72,10 @@
 
 >>> mean = [0,0]
 >>> cov = [[1,0],[0,100]] # diagonal covariance, points lie on x or y-axis
+>>> x,y = np.random.multivariate_normal(mean,cov,5000).T
 
->>> x,y = numpy.multivariate_normal(mean,cov,5000).T
->>> pyplot.plot(x,y,'x'); pyplot.axis('equal'); pyplot.show()
+>>> import matplotlib.pyplot as plt
+>>> plt.plot(x,y,'x'); plt.axis('equal'); pyplot.show()
 
 Note that the covariance matrix must be non-negative definite.
 
@@ -89,7 +90,7 @@
 --------
 >>> mean = (1,2)
 >>> cov = [[1,0],[1,0]]
->>> x = multivariate_normal(mean,cov,(3,3))
+>>> x = np.random.multivariate_normal(mean,cov,(3,3))
 >>> x.shape
 (3, 3, 2)
 



More information about the Numpy-svn mailing list