[Numpy-tickets] [NumPy] #598: incorrect behaviour with ( "%d"%a[i]) on uint64

NumPy numpy-tickets@scipy....
Mon Oct 29 02:08:23 CDT 2007


#598: incorrect behaviour with ( "%d"%a[i]) on uint64
--------------------------+-------------------------------------------------
 Reporter:  gregsmith_to  |        Owner:  somebody
     Type:  defect        |       Status:  reopened
 Priority:  normal        |    Milestone:  1.0.4   
Component:  Other         |      Version:  1.0.2   
 Severity:  normal        |   Resolution:          
 Keywords:                |  
--------------------------+-------------------------------------------------
Comment (by jarrod.millman):

 Stefan was referring to the development code for the upcoming 1.0.4
 release:
 {{{
 >>> import numpy; numpy.__version__
 '1.0.4.dev4253'
 >>> a = numpy.zeros(5,numpy.uint64)
 >>> a[0] = -1
 >>> a
 array([18446744073709551615,                    0,                    0,
                           0,                    0], dtype=uint64)
 >>> "%d"%a[0]
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 TypeError: int argument required
 >>> "%u" % a[0]
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 TypeError: int argument required
 >>> "%x" % a[0]
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 TypeError: int argument required
 }}}

 Do you believe that this behavior is incorrect?

-- 
Ticket URL: <http://scipy.org/scipy/numpy/ticket/598#comment:5>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list