[Numpy-discussion] Random Numbers

John Hunter jdhunter at ace.bsd.uchicago.edu
Wed Jun 2 09:28:03 CDT 2004


>>>>> "Karthikesh" == Karthikesh Raju <karthik at james.hut.fi> writes:

    Karthikesh> Thankx Perry, now i an getting somewhere near, but
    Karthikesh> there are still some issues, matlab and python (exact
    Karthikesh> algorithms) result in different values :(, looking at
    Karthikesh> it though,

One obvious difference, which you are likely aware of, is that rand(N)
in matlab returns an NxN matrix whereas Numeric's MLab and numarray's
linear_algebra.mlab version of rand returns a length N array.  So if
you naively use rand(N) in both cases, your sample sizes will be
wildly different.

Just a thought...

JDH




More information about the Numpy-discussion mailing list