Re: [Numpy-discussion] difference numpy/matlab

2008-01-29 Thread Stuart Brorson
I have to agree with Lorenzo. There is no natural ordering of the complex numbers. Any way you order them is arbitrary. Accepting this, the question then becomes what should NumPy do when the user tries to do order comparison operations on complex numbers. The problem is that NumPy is

[Numpy-discussion] difference numpy/matlab

2008-01-29 Thread lorenzo bolla
I noticed that: min([1+1j,-1+3j]) gives 1+1j in matlab (where for complex, min(abs) is used) but gives -1+3j in numpy (where lexicographic order is used) shouldn't this be mentioned somewhere in Numpy for Matlab users webpage? -- Lorenzo Bolla [EMAIL PROTECTED] http://lorenzobolla.emurse.com/

Re: [Numpy-discussion] difference numpy/matlab

2008-01-29 Thread Robert Kern
Stuart Brorson wrote: I have to agree with Lorenzo. There is no natural ordering of the complex numbers. Any way you order them is arbitrary. Accepting this, the question then becomes what should NumPy do when the user tries to do order comparison operations on complex numbers. The

Re: [Numpy-discussion] difference numpy/matlab

2008-01-29 Thread lorenzo bolla
I'd rather say arbitrary. On 1/29/08, Neal Becker [EMAIL PROTECTED] wrote: lorenzo bolla wrote: I noticed that: min([1+1j,-1+3j]) gives 1+1j in matlab (where for complex, min(abs) is used) but gives -1+3j in numpy (where lexicographic order is used) shouldn't this be mentioned

Re: [Numpy-discussion] difference numpy/matlab

2008-01-29 Thread Neal Becker
lorenzo bolla wrote: I noticed that: min([1+1j,-1+3j]) gives 1+1j in matlab (where for complex, min(abs) is used) but gives -1+3j in numpy (where lexicographic order is used) shouldn't this be mentioned somewhere in Numpy for Matlab users webpage? It should be stated that they're