We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc3f1c3 commit e032c25Copy full SHA for e032c25
pymc_extras/inference/INLA/inla.py
@@ -49,10 +49,9 @@ def fit_INLA(
49
"""
50
model = pm.modelcontext(model)
51
52
- # TODO is there a better way to check if it's a RV?
53
- # print(vars(Q.owner))
54
- # if isinstance(Q, TensorVariable) and "module" in vars(Q.owner):
55
- Q = model.rvs_to_values[Q] if isinstance(Q, TensorVariable) else Q
+ # Get the TensorVariable if Q is provided as an RV
+ if Q in model.rvs_to_values.keys():
+ Q = model.rvs_to_values[Q]
56
57
# Marginalize out the latent field
58
marginalize_kwargs = {
0 commit comments