# [SciPy-user] random number

Razafindrakoto Jean Claude JeanClaude.Razafindrakoto at axa-cessions.com
Tue Jun 29 08:40:10 CDT 2004

```You're right. Wasn't seed changing but truly out of bound call.
Why do you need to generate uniform variate (0,1e38) ?

JC.

______________________________________________________________
AXA CESSIONS

Jean-Claude RAZAFINDRAKOTO

Re-ARMS
Reinsurance - Actuarial and Risk Management Services

109 rue La Boétie
75008 Paris

Tel. : +33 1 56 43 78 54
Fax. : +33 1 56 43 78 70
E-mail : jeanclaude.razafindrakoto at axa-cessions.com
_______________________________________________________________

|-----Message d'origine-----
|De : Steve Schmerler [mailto:elcorto at gmx.net]
|Envoyé : mardi 29 juin 2004 15:23
|À : SciPy Users List
|Objet : Re: RE : RE : [SciPy-user] random number
|
|> When running the example, I didn't get any errors. I'm running Pythonwin
|> with Python 2.3.2 and scipy 0.3
|>
|> >>> from scipy.stats.rand import *
|> >>> x=uniform(0,1e38)[0]
|> >>> x
|> 5.9481523519433107e+037
|> >>> uniform(0,1e38)[0]
|> 7.5203911045864378e+037
|> >>>
|
|sure, 1e38 works also on my machine
|
|    >>> uniform(0,1e38)[0]
|    7.6608738834125681e+037
|
|but 1e39 doesn't
|
|    >>> uniform(0,1e39)[0]
|    1.#INF
|
|>
|> But if you change the seed, e.g
|> >>> uniform(0,1e38)[1]
|> Traceback (most recent call last):
|>   File "<interactive input>", line 1, in ?
|> IndexError: index out of bounds
|
|This is seed changing? Since 'uniform' gives an array like this
|
|    >>> uniform(0,1e38)
|    array([ 5.15205248e+037])
|
|the call
|
|    >>> uniform(0,1e38)[1]
|
|is truly out of bound.
|
|bye
|
|--
|"Documentation is like sex: when it's good,
|it is very, very good; and when it's bad, it
|is better than nothing." -- Dick Brandon
|--
|
|"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
|Jetzt aktivieren unter http://www.gmx.net/info
|
|_______________________________________________
|SciPy-user mailing list
|SciPy-user at scipy.net
|http://www.scipy.net/mailman/listinfo/scipy-user

```