[SciPy-user] bug in stats.randint

Flavio Coelho fccoelho at gmail.com
Thu Apr 23 09:31:34 EDT 2009


Hi,

I stumbled upon something I think is a bug in scipy:

In [4]: stats.randint(1.,15.).ppf([.1,.2,.3,.4,.5])
Out[4]: array([ 2.,  3.,  5.,  6.,  7.])

When you pass float arguments to stats.randint and then call the ppf method,
you get an array of floats, which clearly wrong. The rvs method doesn't
display this bug so I think is a matter of poor type checking in the ppf
implementation...


-- 
---
Flávio Codeço Coelho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20090423/5ccab5e6/attachment.html>


More information about the SciPy-User mailing list