summaryrefslogtreecommitdiff
path: root/numpy/random
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/random')
-rw-r--r--numpy/random/mtrand/mtrand.pyx8
1 files changed, 5 insertions, 3 deletions
diff --git a/numpy/random/mtrand/mtrand.pyx b/numpy/random/mtrand/mtrand.pyx
index e5998c001..b168bf79c 100644
--- a/numpy/random/mtrand/mtrand.pyx
+++ b/numpy/random/mtrand/mtrand.pyx
@@ -4299,11 +4299,13 @@ cdef class RandomState:
the probability density function:
>>> import matplotlib.pyplot as plt
- >>> import scipy.special as sps
- Truncate s values at 50 so plot is interesting
+ >>> from scipy import special
+
+ Truncate s values at 50 so plot is interesting:
+
>>> count, bins, ignored = plt.hist(s[s<50], 50, normed=True)
>>> x = np.arange(1., 50.)
- >>> y = x**(-a)/sps.zetac(a)
+ >>> y = x**(-a) / special.zetac(a)
>>> plt.plot(x, y/max(y), linewidth=2, color='r')
>>> plt.show()