Hi, I am new to Pymc3, I am trying to sample from the posterior of a 1d parameter(phi) using Metropolis. The prior of the parameter is normal and the likelihood is a non-standard distribution. The likelihood is calculated on a vector of 1d residuals. I was following this discussion How to set up a custom likelihood function for two variables - #4 by junpenglao.

```
np.random.seed(123)
def Likelihood(phi,d,value):
logp = 0.0;
for val in value:
logp = logp + (d/2-1)*np.log(val) - 0.5*func1(val, phi)
return logp
def func1(value, phi):
if value <= phi:
return value
else :
return 2*np.sqrt(phi*value) - phi
data = np.loadtxt("residualsnew.txt", dtype=np.float64)
with Model() as func_model:
# Priors for unknown model parameters
phi = Normal('phi', mu=3.0, sd=2.0)
like = DensityDist('like',Likelihood, observed=dict(phi = phi, d = 1, value = data))
#step1 = find_MAP(model = Huber_model)
step2 = Metropolis([phi])
trace = sample(10000, step= [step2], tune = true, tune_interval = 500, chains = 5)
```

The error I am getting is

```
if value <= phi:
File "/home/navlab-shounak/.local/lib/python3.8/site-packages/theano/tensor/var.py", line 67, in __bool__
raise TypeError("Variables do not support boolean operations.")
TypeError: Variables do not support boolean operations.
```