Re: [Numpy-discussion] numpy.random.hypergeometric - strange results

2008-10-02 Thread joep
see http://scipy.org/scipy/numpy/ticket/921 I think I found the error http://scipy.org/scipy/numpy/browser/trunk/numpy/random/mtrand/distributions.c {{{ 805 /* this is a correction to HRUA* by Ivan Frohne in rv.py */ 806 if (good > bad) Z = m - Z; }}} Quickly looking at the refe

[Numpy-discussion] numpy.random.hypergeometric - strange results

2008-09-25 Thread joep
In my fuzz testing of scipy stats, I get sometimes a test failure. I think there is something wrong with numpy.random.hypergeometric for some cases: Josef >>> import numpy.random as mtrand >>> mtrand.hypergeometric(3,17,12,size=10) # there are only 3 good balls in >>> urn array([16, 17, 16, 16