Skip to content

Commit 4317d0d

Browse files
shreyas3156ricardoV94
authored andcommitted
Refactored RV _print_name to long names
1 parent bfd7257 commit 4317d0d

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

pytensor/tensor/random/basic.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class UniformRV(RandomVariable):
8787
ndim_supp = 0
8888
ndims_params = [0, 0]
8989
dtype = "floatX"
90-
_print_name = ("U", "\\operatorname{U}")
90+
_print_name = ("Uniform", "\\operatorname{Uniform}")
9191

9292
def __call__(self, low=0.0, high=1.0, size=None, **kwargs):
9393
r"""Draw samples from a uniform distribution.
@@ -141,7 +141,7 @@ class TriangularRV(RandomVariable):
141141
ndim_supp = 0
142142
ndims_params = [0, 0, 0]
143143
dtype = "floatX"
144-
_print_name = ("Triang", "\\operatorname{Triang}")
144+
_print_name = ("Triangular", "\\operatorname{Triangular}")
145145

146146
def __call__(self, left, mode, right, size=None, **kwargs):
147147
r"""Draw samples from a triangular distribution.
@@ -242,7 +242,7 @@ class NormalRV(RandomVariable):
242242
ndim_supp = 0
243243
ndims_params = [0, 0]
244244
dtype = "floatX"
245-
_print_name = ("N", "\\operatorname{N}")
245+
_print_name = ("Normal", "\\operatorname{Normal}")
246246

247247
def __call__(self, loc=0.0, scale=1.0, size=None, **kwargs):
248248
r"""Draw samples from a normal distribution.
@@ -322,7 +322,7 @@ class HalfNormalRV(ScipyRandomVariable):
322322
ndim_supp = 0
323323
ndims_params = [0, 0]
324324
dtype = "floatX"
325-
_print_name = ("N**+", "\\operatorname{N^{+}}")
325+
_print_name = ("HalfNormal", "\\operatorname{HalfNormal}")
326326

327327
def __call__(self, loc=0.0, scale=1.0, size=None, **kwargs):
328328
r"""Draw samples from a half-normal distribution.
@@ -387,7 +387,7 @@ class LogNormalRV(RandomVariable):
387387
ndim_supp = 0
388388
ndims_params = [0, 0]
389389
dtype = "floatX"
390-
_print_name = ("LogN", "\\operatorname{LogN}")
390+
_print_name = ("LogNormal", "\\operatorname{LogNormal}")
391391

392392
def __call__(self, mean=0.0, sigma=1.0, size=None, **kwargs):
393393
r"""Draw sample from a lognormal distribution.
@@ -651,7 +651,7 @@ class ExponentialRV(RandomVariable):
651651
ndim_supp = 0
652652
ndims_params = [0]
653653
dtype = "floatX"
654-
_print_name = ("Exp", "\\operatorname{Exp}")
654+
_print_name = ("Exponential", "\\operatorname{Exponential}")
655655

656656
def __call__(self, scale=1.0, size=None, **kwargs):
657657
r"""Draw samples from an exponential distribution.
@@ -853,7 +853,7 @@ class MvNormalRV(RandomVariable):
853853
ndim_supp = 1
854854
ndims_params = [1, 2]
855855
dtype = "floatX"
856-
_print_name = ("N", "\\operatorname{N}")
856+
_print_name = ("MultivariateNormal", "\\operatorname{MultivariateNormal}")
857857

858858
def __call__(self, mean=None, cov=None, size=None, **kwargs):
859859
r""" "Draw samples from a multivariate normal distribution.
@@ -931,7 +931,7 @@ class DirichletRV(RandomVariable):
931931
ndim_supp = 1
932932
ndims_params = [1]
933933
dtype = "floatX"
934-
_print_name = ("Dir", "\\operatorname{Dir}")
934+
_print_name = ("Dirichlet", "\\operatorname{Dirichlet}")
935935

936936
def __call__(self, alphas, size=None, **kwargs):
937937
r"""Draw samples from a dirichlet distribution.
@@ -996,7 +996,7 @@ class PoissonRV(RandomVariable):
996996
ndim_supp = 0
997997
ndims_params = [0]
998998
dtype = "int64"
999-
_print_name = ("Pois", "\\operatorname{Pois}")
999+
_print_name = ("Poisson", "\\operatorname{Poisson}")
10001000

10011001
def __call__(self, lam=1.0, size=None, **kwargs):
10021002
r"""Draw samples from a poisson distribution.
@@ -1041,7 +1041,7 @@ class GeometricRV(RandomVariable):
10411041
ndim_supp = 0
10421042
ndims_params = [0]
10431043
dtype = "int64"
1044-
_print_name = ("Geom", "\\operatorname{Geom}")
1044+
_print_name = ("Geometric", "\\operatorname{Geometric}")
10451045

10461046
def __call__(self, p, size=None, **kwargs):
10471047
r"""Draw samples from a geometric distribution.
@@ -1083,7 +1083,7 @@ class HyperGeometricRV(RandomVariable):
10831083
ndim_supp = 0
10841084
ndims_params = [0, 0, 0]
10851085
dtype = "int64"
1086-
_print_name = ("HyperGeom", "\\operatorname{HyperGeom}")
1086+
_print_name = ("HyperGeometric", "\\operatorname{HyperGeometric}")
10871087

10881088
def __call__(self, ngood, nbad, nsample, size=None, **kwargs):
10891089
r"""Draw samples from a geometric distribution.
@@ -1131,7 +1131,7 @@ class CauchyRV(ScipyRandomVariable):
11311131
ndim_supp = 0
11321132
ndims_params = [0, 0]
11331133
dtype = "floatX"
1134-
_print_name = ("C", "\\operatorname{C}")
1134+
_print_name = ("Cauchy", "\\operatorname{Cauchy}")
11351135

11361136
def __call__(self, loc=0.0, scale=1.0, size=None, **kwargs):
11371137
r"""Draw samples from a Cauchy distribution.
@@ -1181,7 +1181,7 @@ class HalfCauchyRV(ScipyRandomVariable):
11811181
ndim_supp = 0
11821182
ndims_params = [0, 0]
11831183
dtype = "floatX"
1184-
_print_name = ("C**+", "\\operatorname{C^{+}}")
1184+
_print_name = ("HalfCauchy", "\\operatorname{HalfCauchy}")
11851185

11861186
def __call__(self, loc=0.0, scale=1.0, size=None, **kwargs):
11871187
r"""Draw samples from a half-Cauchy distribution.
@@ -1235,7 +1235,7 @@ class InvGammaRV(ScipyRandomVariable):
12351235
ndim_supp = 0
12361236
ndims_params = [0, 0]
12371237
dtype = "floatX"
1238-
_print_name = ("InvGamma", "\\operatorname{Gamma^{-1}}")
1238+
_print_name = ("InverseGamma", "\\operatorname{InverseGamma}")
12391239

12401240
def __call__(self, shape, scale, size=None, **kwargs):
12411241
r"""Draw samples from an inverse-gamma distribution.
@@ -1332,7 +1332,7 @@ class TruncExponentialRV(ScipyRandomVariable):
13321332
ndim_supp = 0
13331333
ndims_params = [0, 0, 0]
13341334
dtype = "floatX"
1335-
_print_name = ("TruncExp", "\\operatorname{TruncExp}")
1335+
_print_name = ("TruncatedExponential", "\\operatorname{TruncatedExponential}")
13361336

13371337
def __call__(self, b, loc=0.0, scale=1.0, size=None, **kwargs):
13381338
r"""Draw samples from a truncated exponential distribution.
@@ -1446,7 +1446,7 @@ class BernoulliRV(ScipyRandomVariable):
14461446
ndim_supp = 0
14471447
ndims_params = [0]
14481448
dtype = "int64"
1449-
_print_name = ("Bern", "\\operatorname{Bern}")
1449+
_print_name = ("Bernoulli", "\\operatorname{Bernoulli}")
14501450

14511451
def __call__(self, p, size=None, **kwargs):
14521452
r"""Draw samples from a Bernoulli distribution.
@@ -1539,7 +1539,7 @@ class BinomialRV(RandomVariable):
15391539
ndim_supp = 0
15401540
ndims_params = [0, 0]
15411541
dtype = "int64"
1542-
_print_name = ("Binom", "\\operatorname{Binom}")
1542+
_print_name = ("Binomial", "\\operatorname{Binomial}")
15431543

15441544
def __call__(self, n, p, size=None, **kwargs):
15451545
r"""Draw samples from a binomial distribution.
@@ -1583,7 +1583,7 @@ class NegBinomialRV(ScipyRandomVariable):
15831583
ndim_supp = 0
15841584
ndims_params = [0, 0]
15851585
dtype = "int64"
1586-
_print_name = ("NB", "\\operatorname{NB}")
1586+
_print_name = ("NegativeBinomial", "\\operatorname{NegativeBinomial}")
15871587

15881588
def __call__(self, n, p, size=None, **kwargs):
15891589
r"""Draw samples from a negative binomial distribution.
@@ -1638,7 +1638,7 @@ class BetaBinomialRV(ScipyRandomVariable):
16381638
ndim_supp = 0
16391639
ndims_params = [0, 0, 0]
16401640
dtype = "int64"
1641-
_print_name = ("BetaBinom", "\\operatorname{BetaBinom}")
1641+
_print_name = ("BetaBinomial", "\\operatorname{BetaBinomial}")
16421642

16431643
def __call__(self, n, a, b, size=None, **kwargs):
16441644
r"""Draw samples from a beta-binomial distribution.
@@ -1689,7 +1689,7 @@ class GenGammaRV(ScipyRandomVariable):
16891689
ndim_supp = 0
16901690
ndims_params = [0, 0, 0]
16911691
dtype = "floatX"
1692-
_print_name = ("GG", "\\operatorname{GG}")
1692+
_print_name = ("GeneralizedGamma", "\\operatorname{GeneralizedGamma}")
16931693

16941694
def __call__(self, alpha=1.0, p=1.0, lambd=1.0, size=None, **kwargs):
16951695
r"""Draw samples from a generalized gamma distribution.
@@ -1751,7 +1751,7 @@ class MultinomialRV(RandomVariable):
17511751
ndim_supp = 1
17521752
ndims_params = [0, 1]
17531753
dtype = "int64"
1754-
_print_name = ("MN", "\\operatorname{MN}")
1754+
_print_name = ("Multinomial", "\\operatorname{Multinomial}")
17551755

17561756
def __call__(self, n, p, size=None, **kwargs):
17571757
r"""Draw samples from a discrete multinomial distribution.
@@ -1823,7 +1823,7 @@ class CategoricalRV(RandomVariable):
18231823
ndim_supp = 0
18241824
ndims_params = [1]
18251825
dtype = "int64"
1826-
_print_name = ("Cat", "\\operatorname{Cat}")
1826+
_print_name = ("Categorical", "\\operatorname{Categorical}")
18271827

18281828
def __call__(self, p, size=None, **kwargs):
18291829
r"""Draw samples from a discrete categorical distribution.

0 commit comments

Comments
 (0)