"ValueError: The truth value of an array with more than one element is ambiguous" given at the end of sampling

Hi, here’s a very simple version that still has the bug:

import pymc as pm
import numpy as np
with pm.Model() as model:
    tau = pm.Gamma('tau', alpha=1, beta=1e-4, initval=1.3)
    P = pm.MvNormal('P', shape=3, mu=np.ones(3), cov=np.identity(3))
    trace = pm.sample(step=pm.NUTS([model['tau']]), random_seed=101, draws=100, tune=200, chains=4)

The error goes away when I remove the step parameter, so maybe it has to do with that.

There is also no error when only 3 chains are run, instead of 4.

2 Likes