diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-10-15 05:07:54 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-10-15 05:07:54 -0700 |
commit | 61c8568e8ae2fe0afbb7a96b72902573ac4e22e7 (patch) | |
tree | 09dbe852f682fc20a7b5bbe27ff71e343e4b5e7d | |
parent | 415c62c29a7d074b75c7fb0e05b21c36b5c8e077 (diff) | |
parent | 0390fe34ade1ce3ebf8b27873e2a160c6bc86da5 (diff) | |
download | numpy-61c8568e8ae2fe0afbb7a96b72902573ac4e22e7.tar.gz |
Merge pull request #3919 from nkoep/master
Fix example plot of Laplace distribution
-rw-r--r-- | numpy/random/mtrand/mtrand.pyx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/random/mtrand/mtrand.pyx b/numpy/random/mtrand/mtrand.pyx index c55d178e6..84b52079d 100644 --- a/numpy/random/mtrand/mtrand.pyx +++ b/numpy/random/mtrand/mtrand.pyx @@ -2792,13 +2792,13 @@ cdef class RandomState: >>> import matplotlib.pyplot as plt >>> count, bins, ignored = plt.hist(s, 30, normed=True) >>> x = np.arange(-8., 8., .01) - >>> pdf = np.exp(-abs(x-loc/scale))/(2.*scale) + >>> pdf = np.exp(-abs(x-loc)/scale)/(2.*scale) >>> plt.plot(x, pdf) Plot Gaussian for comparison: >>> g = (1/(scale * np.sqrt(2 * np.pi)) * - ... np.exp( - (x - loc)**2 / (2 * scale**2) )) + ... np.exp(-(x - loc)**2 / (2 * scale**2))) >>> plt.plot(x,g) """ |