diff options
author | Stefan van der Walt <stefan@sun.ac.za> | 2008-07-09 08:49:28 +0000 |
---|---|---|
committer | Stefan van der Walt <stefan@sun.ac.za> | 2008-07-09 08:49:28 +0000 |
commit | 88b409fca114c709615b9df443bfbf58527000b4 (patch) | |
tree | e81f5c3242191779e5a7499bbc8bfad5d0b7c2db | |
parent | c114dd8293e5ab72b57f3810df476b6528966d4f (diff) | |
download | numpy-88b409fca114c709615b9df443bfbf58527000b4.tar.gz |
Fix example docstring.
-rw-r--r-- | numpy/doc/EXAMPLE_DOCSTRING.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/numpy/doc/EXAMPLE_DOCSTRING.txt b/numpy/doc/EXAMPLE_DOCSTRING.txt index 2872de113..ee1326474 100644 --- a/numpy/doc/EXAMPLE_DOCSTRING.txt +++ b/numpy/doc/EXAMPLE_DOCSTRING.txt @@ -72,9 +72,10 @@ generated data-points: >>> 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 @@ Examples -------- >>> 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) |