[Numpy-tickets] [NumPy] #617: numpy.random.randint error with negative numbers
NumPy
numpy-tickets@scipy....
Tue Nov 20 11:17:38 CST 2007
#617: numpy.random.randint error with negative numbers
--------------------------+-------------------------------------------------
Reporter: fawzi | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 1.0.5
Component: numpy.random | Version: none
Severity: normal | Keywords: 64bit typecast
--------------------------+-------------------------------------------------
import numpy.random
print repr(numpy.random.randint(-3,-1))
will print a large positive number (as 4294967293L)
obviously negative 32 bit number interpreted as a positive 64bit number.
>>> numpy.version.version
'1.0.3.1'
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
MacOSX 10.4.10
Intel Core 2 Duo
Fawzi
--
Ticket URL: <http://scipy.org/scipy/numpy/ticket/617>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list