Re: [Numpy-discussion] bug in lexsort with two different dtypes?

2007-06-26 Thread Charles R Harris
On 6/26/07, Charles R Harris <[EMAIL PROTECTED]> wrote: On 6/26/07, Tom Denniston <[EMAIL PROTECTED]> wrote: > > In [1]: intArr1 = numpy.array([ 0, 1, 2,-2,-1, 5,-5,-5]) > In [2]: intArr2 = numpy.array([1,1,1,2,2,2,3,4]) > In [3]: charArr = numpy.array(['a','a','a','b','b','b','c','d']) > > He

Re: [Numpy-discussion] bug in lexsort with two different dtypes?

2007-06-26 Thread Charles R Harris
On 6/26/07, Tom Denniston <[EMAIL PROTECTED]> wrote: In [1]: intArr1 = numpy.array([ 0, 1, 2,-2,-1, 5,-5,-5]) In [2]: intArr2 = numpy.array([1,1,1,2,2,2,3,4]) In [3]: charArr = numpy.array(['a','a','a','b','b','b','c','d']) Here I sort two int arrays. As expected intArr2 dominates intArr1 but

[Numpy-discussion] bug in lexsort with two different dtypes?

2007-06-26 Thread Tom Denniston
In [1]: intArr1 = numpy.array([ 0, 1, 2,-2,-1, 5,-5,-5]) In [2]: intArr2 = numpy.array([1,1,1,2,2,2,3,4]) In [3]: charArr = numpy.array(['a','a','a','b','b','b','c','d']) Here I sort two int arrays. As expected intArr2 dominates intArr1 but the items with the same intArr2 values are sorted forwar

Re: [Numpy-discussion] annoying numpy string to float conversion behaviour

2007-06-26 Thread Torgil Svensson
On 6/26/07, Andrew Straw <[EMAIL PROTECTED]> wrote: > Torgil Svensson wrote: > > > This seems to indicate that float('nan') works on some platforms but > > str(nan) isn't. Is this true on Linux? Could anyone confirm this? What > > about float('inf') and repr(inf) on Linux? > > On Ubuntu Feisty (amd

Re: [Numpy-discussion] annoying numpy string to float conversion behaviour

2007-06-26 Thread Andrew Straw
Torgil Svensson wrote: > This seems to indicate that float('nan') works on some platforms but > str(nan) isn't. Is this true on Linux? Could anyone confirm this? What > about float('inf') and repr(inf) on Linux? On Ubuntu Feisty (amd64) Linux (but this behavior has been the same for at least the

Re: [Numpy-discussion] annoying numpy string to float conversion behaviour

2007-06-26 Thread Torgil Svensson
On 6/26/07, Andrew Straw <[EMAIL PROTECTED]> wrote: > But, as Python is moving away from the libc for file IO in > Python 3K, perhaps string representation of floats would be considered, > too. (In fact for all I know, perhaps it has already been considered.) > Maybe you should email the python-3k-

Re: [Numpy-discussion] effectively computing variograms with numpy

2007-06-26 Thread Hanno Klemm
Didrik, thanks, I'll definitely will have a look at this. Hanno Didrik Pinte <[EMAIL PROTECTED]> said: > > --=-aUNlfGW7wc8MzGzdSDGo > Content-Type: text/plain > Content-Transfer-Encoding: quoted-printable > > On Mon, 2007-06-25 at 23:09 +0200, Hanno Klemm wrote: > > I will try and dig a bit

Re: [Numpy-discussion] effectively computing variograms with numpy

2007-06-26 Thread Didrik Pinte
On Mon, 2007-06-25 at 23:09 +0200, Hanno Klemm wrote: > I will try and dig a bit more in the literature, maybe I find something. > > Hanno I don't know if it can help. We started a project to convert BMELib (a matlab library) into Python. It's still bound with Numeric but it should be pretty stra

Re: [Numpy-discussion] Familiar w/ reduce ?

2007-06-26 Thread Sven Schreiber
Pierre GM schrieb: > All, > I have a (m_1+1,m_2+1) matrix of 0 and 1, and I need to compute a second > matrix U by recurrence. > A double-loop as such > # > U = empty((m_1+1, m_2+1)) > U[:,0] = C[:,0] > U[0,:] = C[0,:] > for i in range(1,m_1+1): > for j in range(1,m