rex wrote:
> Charles R Harris <[EMAIL PROTECTED]> [2006-09-07 15:04]:
>> I don't know about count, but you can gin up something like this
>>
>> In [78]: a = ran.randint(0,2, size=(10,))
>>
>> In [79]: a
>> Out[79]: array([0, 1, 0, 1, 1, 0, 0, 1, 1, 1])
> 
> This exposed inconsistent randint() behavior between SciPy and the Python
> random module. The Python randint includes the upper endpoint. The SciPy
> version excludes it.

numpy.random.random_integers() includes the upper bound, if you like. 
numpy.random does not try to emulate the standard library's random module.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco


-------------------------------------------------------------------------
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
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to