Skip to content

Commit 61f2b4e

Browse files
committed
added close-figs context
1 parent 24888ac commit 61f2b4e

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

pymc/distributions/discrete.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,17 +1140,18 @@ def rng_fn_scipy(cls, rng, lower, upper, size=None):
11401140
return stats.randint.rvs(lower, upper + 1, size=size, random_state=rng)
11411141

11421142

1143-
discrete_uniform = DiscreteUniformRV()
1143+
discrete_uniform = RV()
11441144

11451145

11461146
class DiscreteUniform(Discrete):
1147-
R"""
1148-
Discrete uniform distribution.
1147+
R"""Discrete uniform distribution.
1148+
11491149
The pmf of this distribution is
11501150
11511151
.. math:: f(x \mid lower, upper) = \frac{1}{upper-lower+1}
11521152
11531153
.. plot::
1154+
:context: close-figs
11541155
11551156
import matplotlib.pyplot as plt
11561157
import numpy as np
@@ -1177,9 +1178,9 @@ class DiscreteUniform(Discrete):
11771178
11781179
Parameters
11791180
----------
1180-
lower: int
1181+
lower : tensor_like of int
11811182
Lower limit.
1182-
upper: int
1183+
upper : tensor_like of int
11831184
Upper limit (upper > lower).
11841185
"""
11851186

@@ -1256,6 +1257,7 @@ class Categorical(Discrete):
12561257
.. math:: f(x \mid p) = p_x
12571258
12581259
.. plot::
1260+
:context: close-figs
12591261
12601262
import matplotlib.pyplot as plt
12611263
import numpy as np
@@ -1549,6 +1551,7 @@ class ZeroInflatedBinomial:
15491551
\end{array} \right.
15501552
15511553
.. plot::
1554+
:context: close-figs
15521555
15531556
import matplotlib.pyplot as plt
15541557
import numpy as np
@@ -1624,6 +1627,7 @@ class ZeroInflatedNegativeBinomial:
16241627
\right.
16251628
16261629
.. plot::
1630+
:context: close-figs
16271631
16281632
import matplotlib.pyplot as plt
16291633
import numpy as np

0 commit comments

Comments
 (0)