Using custom likelihood in PYMC3 leads to error with “expected ndarray”
问题 I'm trying to use a custom distribution (Generalized Extreme Value or GEV distribution) in PYMC3. I have written some code to compute this, but I get an error of ValueError: expected an ndarray Apply node that caused the error: MakeVector{dtype='float64'}( logp_sigma_log , __logp_mu, __logp_xi, __logp_x) Here's the code for reference: @theano.as_op(itypes=[tt.dvector, tt.dscalar, tt.dscalar, tt.dscalar], otypes=[tt.dscalar]) def likelihood_op(values, mu, sigma, xi): logp = 0. for val in