Random integers

Charles R Harris charlesr.harris at gmail.com
Mon Oct 23 20:21:28 EDT 2006


On 10/23/06, Tim Hochberg <tim.hochberg at ieee.org> wrote:
>
> Albert Strasheim wrote:
> > Hello all
> >
> > I'm trying to generate random 32-bit integers. None of the following
> seem to
> > do the trick with NumPy 1.0.dev3383:
> >
> > In [32]: N.random.randint(-2**31, 2**31-1)
> > ValueError: low >= high
> >


There should be a raw output from mtrand somewhere that gives random uint32
output which you might be able to cast somehow. Really, there should also be
a signed output somewhere but I haven't looked closely at the mtrand
interface.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20061023/75547267/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-------------- next part --------------
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


More information about the NumPy-Discussion mailing list