8000 Merge pull request #5814 from argriffing/vonmises-docstring · numpy/numpy@bd821f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit bd821f5

Browse files
committed
Merge pull request #5814 from argriffing/vonmises-docstring
DOC: improve the vonmises docstring example
2 parents b282d2a + 8206e8d commit bd821f5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

numpy/random/mtrand/mtrand.pyx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2524,11 +2524,11 @@ cdef class RandomState:
25242524
the probability density function:
25252525
25262526
>>> import matplotlib.pyplot as plt
2527-
>>> import scipy.special as sps
2528-
>>> count, bins, ignored = plt.hist(s, 50, normed=True)
2529-
>>> x = np.arange(-np.pi, np.pi, 2*np.pi/50.)
2530-
>>> y = -np.exp(kappa*np.cos(x-mu))/(2*np.pi*sps.jn(0,kappa))
2531-
>>> plt.plot(x, y/max(y), linewidth=2, color='r')
2527+
>>> from scipy.special import i0
2528+
>>> plt.hist(s, 50, normed=True)
2529+
>>> x = np.linspace(-np.pi, np.pi, num=51)
2530+
>>> y = np.exp(kappa*np.cos(x-mu))/(2*np.pi*i0(kappa))
2531+
>>> plt.plot(x, y, linewidth=2, color='r')
25322532
>>> plt.show()
25332533
25342534
"""

0 commit comments

Comments
 (0)
0