[Numpy-discussion] Random Numbers

Perry Greenfield perry at stsci.edu
Wed Jun 2 07:46:05 CDT 2004


Karthikesh Raju wrote:

> How close is the random number generation from
> numarray.random_array.normal(0,1,x) or
> numarray.linear_algebra.mlab.randn(x) to matlab's randn?
> 
> i am having problems with an identical program written in matlab and
> python, with the results entirely different in both cases :(
> 
Unfortunately, I'm not familiar with matlab and don't have it here
to run. Have you tried comparing simple things between the two
such as mean and standard deviation to see if you are getting
the same result, followed by histograms if you see no differences
there?

Perry Greenfield 




More information about the Numpy-discussion mailing list