Re: [Numpy-discussion] Linear assignment problem: Jonker-Volgenant algorithm

2011-05-17 Thread Gael Varoquaux
On Mon, May 16, 2011 at 10:03:09AM -0700, Hoyt Koepke wrote: I might go that way: I already have pure-Python code that implements it and that I have been using for a year or so. Fair enough -- though you'd probably get a big speed up moving to cython. Indeed. If this is needed, we'll

[Numpy-discussion] fitting legendre polynomial

2011-05-17 Thread Wolfgang Kerzendorf
Hello, The science package I'm using fits legendre polynomials to data. I heard it is more stable than the normal polynomials for a fit. Is there a polyfit for legendre polynomials? How do I do that with the new legendre polynomials module? Thanks Wolfgang

Re: [Numpy-discussion] fitting legendre polynomial

2011-05-17 Thread Charles R Harris
On Tue, May 17, 2011 at 8:03 AM, Wolfgang Kerzendorf wkerzend...@googlemail.com wrote: Hello, The science package I'm using fits legendre polynomials to data. I heard it is more stable than the normal polynomials for a fit. Is there a polyfit for legendre polynomials? How do I do that with

Re: [Numpy-discussion] Linear assignment problem: Jonker-Volgenant algorithm

2011-05-17 Thread Hoyt Koepke
Well, the hungarian algorithm has a theoretical upper bound of O(n^3), with n being the number of nodes, which is pretty much the best you can do if you have a dense graph and make no assumptions on capacities. OK, your input is making my motivation to fight with Jonker-Volgenant go down.

Re: [Numpy-discussion] Linear assignment problem: Jonker-Volgenant algorithm

2011-05-17 Thread Gael Varoquaux
On Tue, May 17, 2011 at 09:36:40AM -0700, Hoyt Koepke wrote: OK, your input is making my motivation to fight with Jonker-Volgenant go down. I'll see with the other people involved if we still target Jonger-Volgenant, or if we stick with the hungarian algorithm, in which case the problem is

Re: [Numpy-discussion] Linear assignment problem: Jonker-Volgenant algorithm

2011-05-17 Thread Benjamin Root
On Tue, May 17, 2011 at 12:49 PM, Gael Varoquaux gael.varoqu...@normalesup.org wrote: On Tue, May 17, 2011 at 09:36:40AM -0700, Hoyt Koepke wrote: OK, your input is making my motivation to fight with Jonker-Volgenant go down. I'll see with the other people involved if we still target

Re: [Numpy-discussion] Linear assignment problem: Jonker-Volgenant algorithm

2011-05-17 Thread Gael Varoquaux
On Tue, May 17, 2011 at 12:55:39PM -0500, Benjamin Root wrote: Is this hungarian method in an official scikits package, or is this just your own thing? Right now we are playing with the idea of integrating it in the scikits learn, as it would be useful in a couple of places. I don't know

[Numpy-discussion] distutils and SWIG problem

2011-05-17 Thread Branimir Sesar
Dear Numpy users, I've been trying to compile Scikits ANN (http://projects.scipy.org/scikits/wiki/AnnWrapper) with Python 2.7.1, numpy 1.6.0, and SWIG 2.0.3 but the compilation breaks down down with this error: running install running bdist_egg running egg_info running build_src build_src

[Numpy-discussion] strange dimension-dependent behaviour of einsum

2011-05-17 Thread Wieland Brendel
Hello, I am encountering a very strange behaviour of einsum on my machine. I tracked the problem down to the following test code: from numpy import * T = random.random((3,10,10)) W = random.random((3,10,7,275)) print all(einsum('ij...,j...-i...',T[0],W[0]) +

Re: [Numpy-discussion] strange dimension-dependent behaviour of einsum

2011-05-17 Thread Charles R Harris
On Tue, May 17, 2011 at 6:47 PM, Wieland Brendel wielandbren...@gmx.netwrote: Hello, I am encountering a very strange behaviour of einsum on my machine. I tracked the problem down to the following test code: from numpy import * T = random.random((3,10,10)) W = random.random((3,10,7,275))

Re: [Numpy-discussion] strange dimension-dependent behaviour of einsum

2011-05-17 Thread Wieland Brendel
The equality being that the _expression_ should be ~0? Exactly. I see the problem when the last index is in the range 235 - 390. Good to see I am not the only one - I was getting crazy. Same range for me by the way. Out of curiosity, which machine/OS are you using? I'm on 64 bit

[Numpy-discussion] strange dimension-dependent behaviour of einsum

2011-05-17 Thread Wieland Brendel
The equality being that the _expression_ should be ~0? Exactly. I see the problem when the last index is in the range 235 - 390. Good to see I am not the only one - I was getting crazy. Same range for me by the way. Out of curiosity, which machine/OS are you using? I'm on

Re: [Numpy-discussion] strange dimension-dependent behaviour of einsum

2011-05-17 Thread Charles R Harris
On Tue, May 17, 2011 at 7:32 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, May 17, 2011 at 6:47 PM, Wieland Brendel wielandbren...@gmx.netwrote: Hello, I am encountering a very strange behaviour of einsum on my machine. I tracked the problem down to the following test

Re: [Numpy-discussion] strange dimension-dependent behaviour of einsum

2011-05-17 Thread Charles R Harris
On Tue, May 17, 2011 at 7:46 PM, Wieland Brendel wielandbren...@gmx.netwrote: The equality being that the expression should be ~0? Exactly. I see the problem when the last index is in the range 235 - 390. Good to see I am not the only one - I was getting crazy. Same range for me by

[Numpy-discussion] strange dimension-dependent behaviour of einsum

2011-05-17 Thread Wieland Brendel
It also fails for T = random.random((2,d,d)) W = random.random((2,d,d,i)) and d 2. For d = 3 it fails for i = 911...1365. Should I submit this as a bug (if so, how do I do that?) and/or contact the author Mark Wiebe? Wieland PS: How

Re: [Numpy-discussion] strange dimension-dependent behaviour of einsum

2011-05-17 Thread Charles R Harris
On Tue, May 17, 2011 at 8:09 PM, Wieland Brendel wielandbren...@gmx.netwrote: It also fails for T = random.random((2,d,d)) W = random.random((2,d,d,i)) and d 2. For d = 3 it fails for i = 911...1365. Should I submit this as a bug (if so, how do I do that?) and/or contact the author

[Numpy-discussion] strange dimension-dependent behaviour of einsum

2011-05-17 Thread Wieland Brendel
Thanks for your reply! I managed to open a ticket, http://projects.scipy.org/numpy/ticket/1834 You are actually right, you can also just use zeros instead of random. Maybe I can test a bit more tomorrow... but its 4am in the morning now ;-). Thanks for your help and kindness! Wieland