Skip to content

Commit 28a670b

Browse files
committed
fix: Handle case with size passed as None
1 parent 02614c8 commit 28a670b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pymc_experimental/model/transforms/autoreparam.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,11 @@ def vip_reparam_node(
177177
if not isinstance(node.op, RandomVariable | SymbolicRandomVariable):
178178
raise TypeError("Op should be RandomVariable type")
179179
_, size, *_ = node.inputs
180-
rv_shape = tuple(size.eval())
180+
eval_size = size.eval()
181+
if eval_size is not None:
182+
rv_shape = tuple(eval_size)
183+
else:
184+
rv_shape = ()
181185
lam_name = f"{name}::lam_logit__"
182186
_log.debug(f"Creating {lam_name} with shape of {rv_shape}")
183187
logit_lam_ = pytensor.shared(

0 commit comments

Comments
 (0)