Skip to content

Commit 07388bc

Browse files
authored
Added close-figs context in discrete RV docstrings (#6301)
* added close-figs context
1 parent 8b73792 commit 07388bc

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

pymc/distributions/discrete.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -913,13 +913,14 @@ def rng_fn_scipy(cls, rng, lower, upper, size=None):
913913

914914

915915
class DiscreteUniform(Discrete):
916-
R"""
917-
Discrete uniform distribution.
916+
R"""Discrete uniform distribution.
917+
918918
The pmf of this distribution is
919919
920920
.. math:: f(x \mid lower, upper) = \frac{1}{upper-lower+1}
921921
922922
.. plot::
923+
:context: close-figs
923924
924925
import matplotlib.pyplot as plt
925926
import numpy as np
@@ -946,9 +947,9 @@ class DiscreteUniform(Discrete):
946947
947948
Parameters
948949
----------
949-
lower: int
950+
lower : tensor_like of int
950951
Lower limit.
951-
upper: int
952+
upper : tensor_like of int
952953
Upper limit (upper > lower).
953954
"""
954955

@@ -997,6 +998,7 @@ class Categorical(Discrete):
997998
.. math:: f(x \mid p) = p_x
998999
9991000
.. plot::
1001+
:context: close-figs
10001002
10011003
import matplotlib.pyplot as plt
10021004
import numpy as np
@@ -1267,6 +1269,7 @@ class ZeroInflatedBinomial:
12671269
\end{array} \right.
12681270
12691271
.. plot::
1272+
:context: close-figs
12701273
12711274
import matplotlib.pyplot as plt
12721275
import numpy as np
@@ -1342,6 +1345,7 @@ class ZeroInflatedNegativeBinomial:
13421345
\right.
13431346
13441347
.. plot::
1348+
:context: close-figs
13451349
13461350
import matplotlib.pyplot as plt
13471351
import numpy as np

0 commit comments

Comments
 (0)