Skip to content

Commit

Permalink
Type rv_op based on behaviour rather than type
Browse files Browse the repository at this point in the history
This is a bit like using a Protocol class, we say that whatever
is passed to rv_op, it should return a TensorVariable.
  • Loading branch information
thomasaarholt committed Sep 2, 2024
1 parent 505effa commit 0d4c57f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymc/distributions/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@ def change_symbolic_rv_size(op: SymbolicRandomVariable, rv, new_size, expand) ->
class Distribution(metaclass=DistributionMeta):
"""Statistical distribution"""

rv_op: RandomVariable | SymbolicRandomVariable = None
rv_type: MetaType = None
rv_op: Callable[..., TensorVariable] | None = None
rv_type: MetaType | None = None

def __new__(
cls,
Expand Down

0 comments on commit 0d4c57f

Please sign in to comment.