-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Description
Description
Reported in https://discourse.pymc.io/t/nonetype-error-on-custom-distribution/12176/7?u=ricardov94
import numpy as np
import pymc as pm
def dist_beta(a, b, loc, scale, size):
return pm.Beta.dist(a, b, size=size) * scale + loc
with pm.Model() as m:
left_beta = pm.CustomDist.dist(
1,
1,
-0.5,
2,
dist=dist_beta,
)
right_beta = pm.CustomDist.dist(
1,
1,
0.5,
2,
dist=dist_beta,
)
w = pm.Dirichlet('w', np.ones(2))
resp = pm.Mixture('resp', w=w, comp_dists=[left_beta, right_beta])
m.logp() # NotImplementedError: Logprob method not implemented for Elemwise{add,no_inplace}