[SciPy-dev] Random integers

Charles Harris charles.harris at sdl.usu.edu
Fri Aug 27 09:20:37 EDT 2004


If it is the same package, it comes from casting a double to float by rounding. It is compiler dependent. This is fixed this in numarray cvs.

Chuck

-----Original Message-----
From:	Robert Kern [mailto:rkern at ucsd.edu]
Sent:	Thu 8/26/2004 3:03 PM
To:	SciPy Developers List
Cc:	
Subject:	[SciPy-dev] Random integers
stats.randint.rvs(min, max) doesn't always do the right thing. Namely, 
it will occasionally give a number equal to max. Numeric's 
RandomArray.randint(min, max) doesn't seem to have this problem (or at 
least the sample size needed to show it is rather higher than that for 
stats.randint).

Oddly enough, they seem to do the same computation. Any thoughts?

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter

_______________________________________________
Scipy-dev mailing list
Scipy-dev at scipy.net
http://www.scipy.net/mailman/listinfo/scipy-dev




-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2696 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20040827/9f5a966d/attachment.bin>


More information about the SciPy-Dev mailing list