[NumPy-Tickets] [NumPy] #1978: numpy.int64 returns OverflowError but numpy.int does not

NumPy Trac numpy-tickets@scipy....
Fri Nov 11 03:21:15 CST 2011


#1978: numpy.int64 returns OverflowError but numpy.int does not
--------------------+-------------------------------------------------------
 Reporter:  JoeCM   |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  normal  |   Milestone:  2.0.0   
Component:  Other   |     Version:  devel   
 Keywords:          |  
--------------------+-------------------------------------------------------
 Hi,
  I am currently running python 2.7.2 compiled using the C compiler GCC
 4.2.1 Compatible Apple Clang 3.0 (tags/Apple/clang-211.10.1) and fortran
 compiler gfortran on a new MacBook Pro with Mac OSX 10.7 (Lion). I
 successfully installed numpy 2.0.0.dev-7297785 from the git archive.
 However, when trying to import another python package (Atpy) it fails
 with:

 invalid[np.int64] = -np.int64(2**63-1)
 OverflowError: Python int too large to convert to C long

 After a short test, I've found that the error comes from simply trying:

 % numpy.int64(2**63-1)

 However, if you try:

 % numpy.int(2**63-1)

 The error does not occur. This same error occurred under the latest stable
 release (1.6.2)

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1978>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list