Skip to content

Commit 9d24a78

Browse files
Fix PolyaGamma's docstring (#6672)
* Fix typos in PolyaGamma's docstring * Add polyagamma to docs env --------- Co-authored-by: Michael Osthege <[email protected]>
1 parent c792e88 commit 9d24a78

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

conda-envs/environment-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dependencies:
2222
- jupyter-sphinx
2323
- myst-nb
2424
- numpydoc
25+
- polyagamma
2526
- pre-commit>=2.8.0
2627
- pymc-sphinx-theme==0.13
2728
- sphinx-copybutton

pymc/distributions/continuous.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3797,7 +3797,8 @@ class PolyaGamma(PositiveContinuous):
37973797
import matplotlib.pyplot as plt
37983798
import numpy as np
37993799
from polyagamma import polyagamma_pdf
3800-
plt.style.use('seaborn-darkgrid')
3800+
import arviz as az
3801+
plt.style.use('arviz-darkgrid')
38013802
x = np.linspace(0.01, 5, 500);x.sort()
38023803
hs = [1., 5., 10., 15.]
38033804
zs = [0.] * 4
@@ -3811,7 +3812,7 @@ class PolyaGamma(PositiveContinuous):
38113812
38123813
======== =============================
38133814
Support :math:`x \in (0, \infty)`
3814-
Mean :math:`dfrac{h}{4} if :math:`z=0`, :math:`\dfrac{tanh(z/2)h}{2z}` otherwise.
3815+
Mean :math:`\dfrac{h}{4}` if :math:`z=0`, :math:`\dfrac{tanh(z/2)h}{2z}` otherwise.
38153816
Variance :math:`0.041666688h` if :math:`z=0`, :math:`\dfrac{h(sinh(z) - z)(1 - tanh^2(z/2))}{4z^3}` otherwise.
38163817
======== =============================
38173818

0 commit comments

Comments
 (0)