Permalink
Browse files

...

  • Loading branch information...
1 parent b882e89 commit 1ee2f5af45901f04e1dc00f0dccdddb643fb5ca4 @apatil apatil committed Oct 21, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 mbgw/__init__.py
View
@@ -156,7 +156,7 @@ def pr(data, a_pred=a_pred, P_trace=P_trace, S_trace=S_trace, F_trace=F_trace):
facs = agecorr.age_corr_factors(data.lo_age, data.up_age, 10000, a_pred, P_trace, S_trace, F_trace).T
def f(sp_sub, facs=facs, n=n):
p=pm.flib.invlogit(sp_sub)*facs[np.random.randint(10000)]
- return np.random.binomial(n,p).astype('float')/n
+ return np.random.binomial(n.astype('int'),p).astype('float')/n
return obs, n, f
validate_postproc=[pr]

0 comments on commit 1ee2f5a

Please sign in to comment.