Beispiel #1
0
 def logp(value, n, p):
     return check_parameters(
         factln(n) - factln(value).sum() + (value * at.log(p)).sum(),
         value >= 0,
         0 <= p,
         p <= 1,
         at.isclose(p.sum(), 1),
     )
Beispiel #2
0
 def logp(value, n, p):
     return check_parameters(
         factln(n) - factln(value).sum() + (value * at.log(p)).sum(),
         at.all(value >= 0),
         at.all(0 <= p),
         at.all(p <= 1),
         at.isclose(p.sum(), 1),
     )
Beispiel #3
0
 def logp(value, n, p):
     return bound(
         factln(n) - factln(value).sum() + (value * at.log(p)).sum(),
         at.all(value >= 0),
         at.all(0 <= p),
         at.all(p <= 1),
         at.isclose(p.sum(), 1),
         broadcast_conditions=False,
     )