[Numpy-tickets] [NumPy] #923: numpy.random.logseries - incorrect convergence for k=1, k=2
NumPy
numpy-tickets@scipy....
Fri Oct 3 00:09:08 CDT 2008
#923: numpy.random.logseries - incorrect convergence for k=1, k=2
--------------------------+-------------------------------------------------
Reporter: josefpktd | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: numpy.random | Version: none
Severity: normal | Resolution:
Keywords: |
--------------------------+-------------------------------------------------
Comment (by josefpktd):
I think I got it, the schematic description in Devroye is inconsistent
with the text just before:
{{{
X=1 If and only If V>= q = 1.0 - exp(r*U), and that X in {1,2} If and only
If V >= q*q.
}}}
The schematic description agrees with
{{{
871 if (V <= q) {
872 return 1;
873 }
}}}
Note this implies: if q*q < V <= q then return 1, if V>q return 2
this just reverses the role of 1 and 2 relative to the stated inequality.
Since I don't compile numpy, I cannot test this.
Josef
--
Ticket URL: <http://scipy.org/scipy/numpy/ticket/923#comment:3>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list