I follow the steps and encounter the error,
‘numpy.ndarray’ object has no attribute ‘type’
and I found this
like,
@as_op(itypes=[tt.dvector,tt.dvector,tt.dvector,tt.dvector], otypes=[tt.dvector])
def logplnln(Liq,value,wF,wNF):
…with pm.Model() as model_h:
def logp(value):
return logplnln(theano.shared(Liq.astype(‘float64’))
,theano.shared(value.astype(‘float64’))
,theano.shared(wF.astype(‘float64’))
,theano.shared(wNF.astype(‘float64’)))
…
c = pm.DensityDist(
‘c’, logp, observed=FS)
and with or without ‘.astype(‘float64’)’ encounter
TypeError: Shared variable constructor needs numeric values and not symbolic variables.
I cannot figure out why, all the variables are np.array