[SciPy-dev] Instability in numpy.random.logseries

Robert Kern robert.kern@gmail....
Sun Aug 24 18:09:35 CDT 2008


On Sun, Aug 24, 2008 at 15:58, Alan Jackson <alan@ajackson.org> wrote:
> For parameter values close to one, the returned valued can be bad.
>
> In [242]: np.random.logseries(.999999999,10)
> Out[242]:
> array([        910, -2147483648,       13814,       17661,          14,
>              3783,         335,   180167317,          38,   256949708])

I'll take a look at it. This is one of those conversion to longs,
again. I have to get on a plane now, so we'll see if I can fix it
before I land in Austin.

> For that matter, the function accepts an input of 1.0, but the output
> is not useful. It should probably throw an error.
>
> In [225]: np.random.logseries(1.,10)
> Out[225]:
> array([-2147483648, -2147483648, -2147483648, -2147483648, -2147483648,
>       -2147483648, -2147483648, -2147483648, -2147483648, -2147483648])

We should raise an exception for exactly 0 and 1, yes.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco


More information about the Scipy-dev mailing list