[SciPy-user] random numbers in scipy

Giovanni Samaey Giovanni.Samaey@cs.kuleuven...
Mon Apr 23 08:58:16 CDT 2007


Thanks for the (short) answer:

1. Only numpy.random has a "random.seed".  So I assume I should be using 
that module, and not scipy.stats?

2. Do I seed the module, or an instance of something (as in pygsl)? 

The method is not described in the numpy book, and the docstring  says 
it is a method of mtrand.RandomState, which is an object.  I deduce from 
this that the module initialises one single object of this type on 
import, which is used by every call to generate a random number, for any 
distribution?  Is this a right deduction?

Giovanni

Nils Wagner wrote:
> Giovanni Samaey wrote:
>   
>> Hi all,
>>
>> I apologize if this question is silly; I checked the mailing list, the 
>> module documentation, the numpy book and the scipy site for the answer 
>> but couldn't find it.
>>
>> 1. Is the numpy.random module identical to the scipy.stats module?
>>
>> 2. (How) can I set the seed for the random number generator?
>>
>>   
>>     
> random.seed
>   
>


More information about the SciPy-user mailing list