Skip to content

Commit 22cec6b

Browse files
Fix distribution return type hints
1 parent 7f32c30 commit 22cec6b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pymc/distributions/distribution.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ def __new__(
198198
total_size=None,
199199
transform=UNSET,
200200
**kwargs,
201-
) -> RandomVariable:
202-
"""Adds a RandomVariable corresponding to a PyMC distribution to the current model.
201+
) -> TensorVariable:
202+
"""Adds a tensor variable corresponding to a PyMC distribution to the current model.
203203
204204
Note that all remaining kwargs must be compatible with ``.dist()``
205205
@@ -231,8 +231,8 @@ def __new__(
231231
232232
Returns
233233
-------
234-
rv : RandomVariable
235-
The created RV, registered in the Model.
234+
rv : TensorVariable
235+
The created random variable tensor, registered in the Model.
236236
"""
237237

238238
try:
@@ -296,8 +296,8 @@ def dist(
296296
*,
297297
shape: Optional[Shape] = None,
298298
**kwargs,
299-
) -> RandomVariable:
300-
"""Creates a RandomVariable corresponding to the `cls` distribution.
299+
) -> TensorVariable:
300+
"""Creates a tensor variable corresponding to the `cls` distribution.
301301
302302
Parameters
303303
----------
@@ -314,8 +314,8 @@ def dist(
314314
315315
Returns
316316
-------
317-
rv : RandomVariable
318-
The created RV.
317+
rv : TensorVariable
318+
The created random variable tensor.
319319
"""
320320
if "testval" in kwargs:
321321
kwargs.pop("testval")
@@ -653,8 +653,8 @@ def __new__(
653653
name : str
654654
dist_params : Tuple
655655
A sequence of the distribution's parameter. These will be converted into
656-
Aesara tensors internally. These parameters could be other ``RandomVariable``
657-
instances.
656+
Aesara tensors internally. These parameters could be other ``TensorVariable``
657+
instances created from , optionally created via ``RandomVariable`` ``Op``s.
658658
logp : Optional[Callable]
659659
A callable that calculates the log density of some given observed ``value``
660660
conditioned on certain distribution parameter values. It must have the

0 commit comments

Comments
 (0)