[Numpy-tickets] [NumPy] #424: stable argsort() and sort() behave differently on 2-column uint64 arrays. possibly a bug in argsort() or sort() .

NumPy numpy-tickets@scipy....
Sun Apr 1 16:59:37 CDT 2007


#424: stable argsort() and sort() behave differently on 2-column uint64 arrays.
possibly a bug in argsort() or sort() .
------------------------+---------------------------------------------------
 Reporter:  ciro        |        Owner:  somebody     
     Type:  defect      |       Status:  new          
 Priority:  high        |    Milestone:  1.0.2 Release
Component:  numpy.core  |      Version:  1.0.1        
 Severity:  major       |   Resolution:               
 Keywords:              |  
------------------------+---------------------------------------------------
Comment (by charris):

 I think it is a problem in copy. Note that the high bit isn't actually set
 because randint(2**20) is always less than 2**20.


 {{{
 In [96]: x = zeros((500000,2), dtype=int64)

 In [97]: for i in xrange(500000) : x[i,0] = random.randint(2**20) << 43
    ....:

 In [98]: y = x[:,0]

 In [99]: alltrue(x[:,0] == y)
 Out[99]: True

 In [100]: y = x[:,0].copy()

 In [101]: alltrue(x[:,0] == y)
 Out[101]: False

 }}}

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


More information about the Numpy-tickets mailing list