Re: numpy array sorting weirdness

2009-03-29 Thread Daniel Fetchinson
>> Is there any reason the 'axis' keyword argument doesn't default to the >> value that corresponds to python list behaviour? That would make lot >> of sense I think. Or retaining compatibility with python lists is not >> really a goal of numpy.array? > > Not at all. It's an entirely different data

Re: numpy array sorting weirdness

2009-03-29 Thread Robert Kern
On 2009-03-28 22:35, Daniel Fetchinson wrote: Is there any reason the 'axis' keyword argument doesn't default to the value that corresponds to python list behaviour? That would make lot of sense I think. Or retaining compatibility with python lists is not really a goal of numpy.array? Not at al

Re: numpy array sorting weirdness

2009-03-28 Thread Daniel Fetchinson
>> The fact that the following two outputs are not the same is a bug or a >> feature of numpy? >> >> # I would have thought the two array outputs would be the same ## >> >> import numpy >> >> a = [ [ 0, 0 ], [ 1, 0 ], [ 1, 1 ] ] >> >> pythonarray = a >> pythonarray.sort( ) >> print pythonar

Re: numpy array sorting weirdness

2009-03-28 Thread John O'Hagan
On Sun, 29 Mar 2009, Daniel Fetchinson wrote: [...] > The fact that the following two outputs are not the same is a bug or a > feature of numpy? > > # I would have thought the two array outputs would be the same ## > > import numpy > > a = [ [ 0, 0 ], [ 1, 0 ], [ 1, 1 ] ] > > pythonarray

Re: numpy array sorting weirdness

2009-03-28 Thread MRAB
Daniel Fetchinson wrote: So far I was working under the assumption that the numpy array implementation can be used as a drop-in replacement for native python lists, i.e. wherever I see a list 'a' and I want to speed up my numerical calculations I just replace it with 'numpy.array( a )' and everyt

Re: numpy array sorting weirdness

2009-03-28 Thread Daniel Fetchinson
>> So far I was working under the assumption that the numpy array >> implementation can be used as a drop-in replacement for native python >> lists, i.e. wherever I see a list 'a' and I want to speed up my >> numerical calculations I just replace it with 'numpy.array( a )' and >> everything will wo

numpy array sorting weirdness

2009-03-28 Thread Daniel Fetchinson
So far I was working under the assumption that the numpy array implementation can be used as a drop-in replacement for native python lists, i.e. wherever I see a list 'a' and I want to speed up my numerical calculations I just replace it with 'numpy.array( a )' and everything will work just as befo