@@ -88,15 +88,15 @@ def dist(cls, init_dist, innovation_dist, steps=None, **kwargs) -> pt.TensorVari
8888 if not (
8989 isinstance (init_dist , pt .TensorVariable )
9090 and init_dist .owner is not None
91- and isinstance (init_dist .owner .op , ( RandomVariable , SymbolicRandomVariable ) )
91+ and isinstance (init_dist .owner .op , RandomVariable | SymbolicRandomVariable )
9292 ):
9393 raise TypeError ("init_dist must be a distribution variable" )
9494 check_dist_not_registered (init_dist )
9595
9696 if not (
9797 isinstance (innovation_dist , pt .TensorVariable )
9898 and innovation_dist .owner is not None
99- and isinstance (innovation_dist .owner .op , ( RandomVariable , SymbolicRandomVariable ) )
99+ and isinstance (innovation_dist .owner .op , RandomVariable | SymbolicRandomVariable )
100100 ):
101101 raise TypeError ("innovation_dist must be a distribution variable" )
102102 check_dist_not_registered (innovation_dist )
@@ -129,7 +129,7 @@ def get_steps(cls, innovation_dist, steps, shape, dims, observed):
129129 if not (
130130 isinstance (innovation_dist , pt .TensorVariable )
131131 and innovation_dist .owner is not None
132- and isinstance (innovation_dist .owner .op , ( RandomVariable , SymbolicRandomVariable ) )
132+ and isinstance (innovation_dist .owner .op , RandomVariable | SymbolicRandomVariable )
133133 ):
134134 raise TypeError ("innovation_dist must be a distribution variable" )
135135
@@ -549,7 +549,7 @@ def dist(
549549
550550 if init_dist is not None :
551551 if not isinstance (init_dist , TensorVariable ) or not isinstance (
552- init_dist .owner .op , ( RandomVariable , SymbolicRandomVariable )
552+ init_dist .owner .op , RandomVariable | SymbolicRandomVariable
553553 ):
554554 raise ValueError (
555555 f"Init dist must be a distribution created via the `.dist()` API, "
@@ -948,7 +948,7 @@ def dist(cls, dt, sde_fn, sde_pars, *, init_dist=None, steps=None, **kwargs):
948948
949949 if init_dist is not None :
950950 if not isinstance (init_dist , TensorVariable ) or not isinstance (
951- init_dist .owner .op , ( RandomVariable , SymbolicRandomVariable )
951+ init_dist .owner .op , RandomVariable | SymbolicRandomVariable
952952 ):
953953 raise ValueError (
954954 f"Init dist must be a distribution created via the `.dist()` API, "
0 commit comments