[Scipy-tickets] [SciPy] #1842: wrong value returned by scipy.stats.binom probability mass function when true probability is 1
SciPy Trac
scipy-tickets@scipy....
Mon Feb 11 18:44:06 CST 2013
#1842: wrong value returned by scipy.stats.binom probability mass function when
true probability is 1
-------------------------+--------------------------------------------------
Reporter: leflage | Owner: rgommers
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: scipy.stats | Version: 0.11.0
Keywords: |
-------------------------+--------------------------------------------------
Comment(by josefpktd):
as extra check: _argcheck doesn't disallow the extreme cases of pr 0 or 1,
which I thought could also be the reason for getting nans.
I don't know if the other methods will also handle the degenerate cases
correctly.
scipy 0.9
for binom:
def _argcheck(self, n, pr):
self.b = n
return (n>=0) & (pr >= 0) & (pr <= 1)
--
Ticket URL: <http://projects.scipy.org/scipy/ticket/1842#comment:2>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.
More information about the Scipy-tickets
mailing list