[Numpy-tickets] [NumPy] #921: numpy.random.hypergeometric: error for some cases
NumPy
numpy-tickets@scipy....
Fri Dec 12 00:13:06 CST 2008
#921: numpy.random.hypergeometric: error for some cases
--------------------------+-------------------------------------------------
Reporter: josefpktd | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: numpy.random | Version: none
Severity: normal | Resolution:
Keywords: |
--------------------------+-------------------------------------------------
Comment (by josefpktd):
The proposed fix didn't work, comparing with rv.py alpha and beta seemed
to be mixed up, but the mistake was on the next line
Here's the diff
{{{
Index: c:/Josef/_progs/Subversion/numpy-
trunk/numpy/random/mtrand/distributions.c
===================================================================
--- c:/Josef/_progs/Subversion/numpy-
trunk/numpy/random/mtrand/distributions.c (revision 6139)
+++ c:/Josef/_progs/Subversion/numpy-
trunk/numpy/random/mtrand/distributions.c (working copy)
@@ -806,7 +806,7 @@
if (good > bad) Z = m - Z;
/* another fix from rv.py to allow sample to exceed popsize/2 */
- if (m < sample) Z = bad - Z;
+ if (m < sample) Z = good - Z;
return Z;
}}}
Trying out different examples, this seems to fix the problems, however, I
don't have any tests yet.
--
Ticket URL: <http://scipy.org/scipy/numpy/ticket/921#comment:2>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list