[Numpy-discussion] Re: random number facilities in numarray and main Python libs

Travis Oliphant oliphant at ee.byu.edu
Tue Sep 28 11:11:12 EDT 2004

Faheem Mitha wrote:

>On Tue, 07 Sep 2004 16:35:11 -0700, Robert Kern <rkern at ucsd.edu> wrote:
>>Faheem Mitha wrote:
>>>Are the random number facilities provided by numarray.random_array 
>>>superior to those provided to those provided by the random module in the 
>>>Python library? They certainly seem more extensive, and I like the 
>>>interface better.
>>>If so, why not replace the random module by the equivalent functionality 
>>>from numarray.random_array, and have everyone use the same random number 
>>>generator? Or is this impossible for practical reasons?
>>numarray.random_array can generate arrays full of random numbers. 
>>Standard Python's random does not and will not until numarray is part of 
>>the standard library. Standard Python's random also uses the Mersenne 
>>Twister algorithm which is, by most accounts, superior to RANLIB's 
>>algorithm, so I for one would object to replacing it with numarray's 
>>code.  :-)
>>I do intend to implement the Mersenne Twister algorithm for SciPy's PRNG 
>>facilities (on some unspecified weekend). I will also try to code 
>>something up for numarray, too.
>Does SciPy have its own random num facilities too? It would easier to
>just consolidate all these efforts, I would have thought.
I would agree, which is why I don't like the current move to put all 
kinds of processing facility into numarray.    It is creating two 
parallel efforts and causing a split in the community.

The purpose of SciPy was to collect scientific algorithms together 
(scipy's random number facilities are borrowed and enhanced from Numeric 
--- same place numarray comes from).

-Travis O.

More information about the NumPy-Discussion mailing list