[SciPy-user] Bug in scipy.stats.rv_discrete is on line 3218
Tue Aug 21 09:00:45 CDT 2007
I have traced the bug to line 3218 of distributions.py
The problem is with the operation of argmax in the _drv_ppf handler.
It can be solved by pulling the correct state out of self.Finv (using a probability, as generated by mtrand.random_sample), in an order -preserving manner.
As soon as tracs starts working i'll post some more demo testcode
Stefan van der Walt <firstname.lastname@example.org> wrote: Hi Michael
Thanks for the report. This should be fixed in SVN revision 3246.
On Tue, Aug 14, 2007 at 01:08:45PM +0100, Michael Nandris wrote:
> I think there may be an issue with the way rv_discrete orders its output when
> it encounters zeros in the input, causing non-zero probabilities to creep up
> towards the end of the output. If you are attempting to track the accumulation
> of states in an n-state Markov chain, this is a problem!
> I have had a look at the API but can't figure it. Any help at fixing this would
> be much appreciated.
SciPy-user mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user