Skip to content

Commit 2db70ce

Browse files
Add return type hints
Closes #4880
1 parent 4d2f3a8 commit 2db70ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pymc/distributions/logprob.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from pymc.aesaraf import floatX
4040

4141

42-
def _get_scaling(total_size: Optional[Union[int, Sequence[int]]], shape, ndim: int):
42+
def _get_scaling(total_size: Optional[Union[int, Sequence[int]]], shape, ndim: int) -> TensorVariable:
4343
"""
4444
Gets scaling constant for logp.
4545
@@ -288,14 +288,14 @@ def logp(rv: TensorVariable, value) -> TensorVariable:
288288
raise NotImplementedError("PyMC could not infer logp of input variable.") from exc
289289

290290

291-
def logcdf(rv, value):
291+
def logcdf(rv, value) -> TensorVariable:
292292
"""Return the log-cdf graph of a Random Variable"""
293293

294294
value = at.as_tensor_variable(value, dtype=rv.dtype)
295295
return logcdf_aeppl(rv, value)
296296

297297

298-
def ignore_logprob(rv):
298+
def ignore_logprob(rv) -> TensorVariable:
299299
"""Return a duplicated variable that is ignored when creating Aeppl logprob graphs
300300
301301
This is used in SymbolicDistributions that use other RVs as inputs but account

0 commit comments

Comments
 (0)