Skip to content

Commit 58217cc

Browse files
committed
Add more missing functions to math module
1 parent 419af06 commit 58217cc

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

pymc/math.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,21 @@
3232
from pytensor.tensor import (
3333
abs,
3434
and_,
35+
arccos,
36+
arccosh,
37+
arcsin,
38+
arcsinh,
39+
arctan,
40+
arctanh,
3541
broadcast_to,
3642
ceil,
3743
clip,
3844
concatenate,
3945
constant,
4046
cos,
4147
cosh,
48+
cumprod,
49+
cumsum,
4250
dot,
4351
eq,
4452
erf,
@@ -59,8 +67,10 @@
5967
logsumexp,
6068
lt,
6169
matmul,
70+
max,
6271
maximum,
6372
mean,
73+
min,
6474
minimum,
6575
neq,
6676
ones,
@@ -94,13 +104,21 @@
94104
__all__ = [
95105
"abs",
96106
"and_",
107+
"arccos",
108+
"arccosh",
109+
"arcsin",
110+
"arcsinh",
111+
"arctan",
112+
"arctanh",
97113
"broadcast_to",
98114
"ceil",
99115
"clip",
100116
"concatenate",
101117
"constant",
102118
"cos",
103119
"cosh",
120+
"cumprod",
121+
"cumsum",
104122
"dot",
105123
"eq",
106124
"erf",
@@ -121,14 +139,17 @@
121139
"logsumexp",
122140
"lt",
123141
"matmul",
142+
"max",
124143
"maximum",
125144
"mean",
145+
"min",
126146
"minimum",
127147
"neq",
128148
"ones",
129149
"ones_like",
130150
"or_",
131151
"prod",
152+
"round",
132153
"sgn",
133154
"sigmoid",
134155
"sin",
@@ -258,7 +279,7 @@ def kron_diag(*diags):
258279
return reduce(flat_outer, diags)
259280

260281

261-
def tround(*args, **kwargs):
282+
def round(*args, **kwargs):
262283
"""
263284
Temporary function to silence round warning in PyTensor. Please remove
264285
when the warning disappears.
@@ -267,6 +288,11 @@ def tround(*args, **kwargs):
267288
return pt.round(*args, **kwargs)
268289

269290

291+
def tround(*args, **kwargs):
292+
warnings.warn("tround is deprecated. Use round instead.")
293+
return round(*args, **kwargs)
294+
295+
270296
def logdiffexp(a, b):
271297
"""log(exp(a) - exp(b))"""
272298
return a + pt.log1mexp(b - a)

0 commit comments

Comments
 (0)