New issue 2046: Incorrect in-place sort behavior in numpy array slice https://bitbucket.org/pypy/pypy/issue/2046/incorrect-in-place-sort-behavior-in-numpy
Ed Baskerville: In PyPy 2.5.1, OS X binary build, PyPy's numpy fork, sorting a column slice of a 2D numpy array can result in incorrect behavior. In this case, the mistaken modifications are not restricted to the column being sorted: ```{python} >>>> import numpy >>>> x = numpy.array([[2,0],[1,0]]) >>>> x array([[2, 0], [1, 0]]) >>>> x[0,:].sort() >>>> x array([[0, 2], [1, 0]]) ``` The behavior should be (as generated using Python 2.7.9/Anaconda 2.0.1): ```{python} >>> import numpy >>> x = numpy.array([[2,0],[1,0]]) >>> x array([[2, 0], [1, 0]]) >>> x[:,0].sort() >>> x array([[1, 0], [2, 0]]) ``` _______________________________________________ pypy-issue mailing list pypy-issue@python.org https://mail.python.org/mailman/listinfo/pypy-issue