Categorical vs Discrete Uniform

The reason is that

  • pm.Categorical returns an integer between 0 to length of p, and 0 will cause logp being undefined for Binomial.
  • poor model parameterization in general as n could be smaller than kdata

You can try k= pm.Binomial('k', p=theta, n=n+max(kdata), observed=kdata)