[NumPy-Tickets] [NumPy] #1608: numpy.sort on x.flat modifies x

NumPy Trac numpy-tickets@scipy....
Thu Sep 9 20:38:28 CDT 2010


#1608: numpy.sort on x.flat modifies x
---------------------------+------------------------------------------------
 Reporter:  carlscheffler  |       Owner:  somebody
     Type:  defect         |      Status:  new     
 Priority:  normal         |   Milestone:  1.5.1   
Component:  numpy.core     |     Version:  1.3.0   
 Keywords:  sort, flat     |  
---------------------------+------------------------------------------------

Comment(by charris):

 Also:

 {{{

 In [11]: x = array([[1,2],[3,4]]).T

 In [12]: x
 Out[12]:
 array([[1, 3],
        [2, 4]])

 In [13]: asanyarray(x.flat).copy()
 Out[13]: array([1, 3, 2, 4])

 In [14]: x
 Out[14]:
 array([[1, 2],
        [3, 4]])


 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1608#comment:4>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list