[NumPy-Tickets] [NumPy] #1878: numpy.argmin() fails to find the minimum for the most negative integer

NumPy Trac numpy-tickets@scipy....
Wed Jun 22 10:39:05 CDT 2011


#1878: numpy.argmin() fails to find the minimum for the most negative integer
----------------------+-----------------------------------------------------
 Reporter:  tlatorre  |       Owner:  somebody   
     Type:  defect    |      Status:  new        
 Priority:  normal    |   Milestone:  Unscheduled
Component:  Other     |     Version:  1.3.0      
 Keywords:            |  
----------------------+-----------------------------------------------------
 {{{
 #!python
 >>> a = np.array([-2**7, -2**7+1, -2**7+2], dtype=np.int8)
 >>> a
 array([-128, -127, -126], dtype=int8)
 >>> np.argmin(a)
 1
 >>> b = np.array([-2**15, -2**15+1, -2**15+2], dtype=np.int16)
 >>> b
 array([-32768, -32767, -32766], dtype=int16)
 >>> np.argmin(b)
 1
 >>> c = np.array([-2**31, -2**31+1, -2**31+2], dtype=np.int32)
 >>> c
 array([-2147483648, -2147483647, -2147483646], dtype=int32)
 >>> np.argmin(c)
 1
 }}}

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


More information about the NumPy-Tickets mailing list