Re: [Numpy-discussion] expensive tensordot

2010-06-16 Thread Paul Northug
Dag Sverre Seljebotn dagss at student.matnat.uio.no writes: Paul Northug wrote: I have a computation bounded by one step and I have always wondered how to make it fast enough to be useable. I suspect that I have to use an approximation, but I was hoping someone would spot a major

Re: [Numpy-discussion] Fastest way to save a dictionary of numpy record arrays

2010-06-16 Thread Vishal Rana
Thanks On Tue, Jun 15, 2010 at 8:49 PM, Robert Kern robert.k...@gmail.com wrote: On Tue, Jun 15, 2010 at 01:56, Vishal Rana ranavis...@gmail.com wrote: Robert, As you said, I was able to get the results, but I now got a question as np.load('np.npz') returns me a class

[Numpy-discussion] f2py with 4.1 under snow leopard

2010-06-16 Thread Charles سمير Doutriaux
Hi, I cannot build any f2py extension under nupmy 4.1 on Mac snow leopard. Everything (python/numpy) has been built 64bit. I'm attaching the log of a VERY simple piece of code, that always worked fine before. Any idea on why it's not finding the basic python things (Py_BuildValue for

Re: [Numpy-discussion] f2py with 4.1 under snow leopard

2010-06-16 Thread Robert Kern
2010/6/16 Charles سمير Doutriaux doutria...@llnl.gov: Hi, I cannot build any f2py extension under nupmy 4.1 on Mac snow leopard. Everything (python/numpy) has been built 64bit. I'm attaching the log of a VERY simple piece of code, that always worked fine before. Any idea on why it's not

[Numpy-discussion] Trimming the np arrays

2010-06-16 Thread Vishal Rana
Hi, I have a list of np arrays from which I create a np record array, but they all of of different length! How can I trim them all in place (for example I want to get last 10 elements of each)? Thanks Vishal Rana ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] Trimming the np arrays

2010-06-16 Thread Robert Kern
On Wed, Jun 16, 2010 at 12:15, Vishal Rana ranavis...@gmail.com wrote: Hi, I have a list of np arrays from which I create a np record array, but they all of of different length! How can I trim them all in place (for example I want to get last 10 elements of each)? x = x[-10:] -- Robert

Re: [Numpy-discussion] Trimming the np arrays

2010-06-16 Thread Vishal Rana
Robert, Do I have to repeat it for each element in the list or is there a way I can iterate the list and do it? Thanks Vishal Rana On Wed, Jun 16, 2010 at 10:23 AM, Robert Kern robert.k...@gmail.com wrote: On Wed, Jun 16, 2010 at 12:15, Vishal Rana ranavis...@gmail.com wrote: Hi, I have

Re: [Numpy-discussion] Trimming the np arrays

2010-06-16 Thread Robert Kern
On Wed, Jun 16, 2010 at 12:30, Vishal Rana ranavis...@gmail.com wrote: Robert, Do I have to repeat it for each element in the list or is there a way I can iterate the list and do it? new_list = [x[-10:] for x in old_list] -- Robert Kern I have come to believe that the whole world is an

Re: [Numpy-discussion] Trimming the np arrays

2010-06-16 Thread Vishal Rana
It helped, Thanks On Wed, Jun 16, 2010 at 10:39 AM, Robert Kern robert.k...@gmail.com wrote: On Wed, Jun 16, 2010 at 12:30, Vishal Rana ranavis...@gmail.com wrote: Robert, Do I have to repeat it for each element in the list or is there a way I can iterate the list and do it? new_list

Re: [Numpy-discussion] f2py with 4.1 under snow leopard

2010-06-16 Thread Charles سمير Doutriaux
Hi Robert, You're right. I finally figured out which flag was missing I'm posting it here as a reference for others: I needed to add: -undefined dynamic_lookup I also removed -fPIC Hope this helps somebody else. Do you think it would be possible to have LDFLAGS added to the default ones? Or

Re: [Numpy-discussion] f2py with 4.1 under snow leopard

2010-06-16 Thread Robert Kern
2010/6/16 Charles سمير Doutriaux doutria...@llnl.gov: Hi Robert, You're right. I finally figured out which flag was missing I'm posting it here as a reference for others: I needed to add: -undefined dynamic_lookup I also removed -fPIC Hope this helps somebody else. Do you think it

[Numpy-discussion] Object with __array_priority__ = 1000 invokes __len__ and __get__ item on rmul

2010-06-16 Thread John Salvatier
Hello, I have a class with __array_priority__ = 1000, and I have found that multiplying it with a ndarray on the left invokes __len__ and __get__ item (if the length of the right side 1) before invoking __rmul__ for my object. This seems odd to me. I understood that ndarray would defer to

[Numpy-discussion] Building Numpy: could not read symbols Bad value error

2010-06-16 Thread Michael Green
Bright minds, I'm trying to build Numpy v1.4.1 from source on CentOS 5.2 x64 and running into errors. It seems to be linking error. Regrettably, I don't posses the necessary skill to decipher the error. So your help will be invaluable. I configured (and then successfully built) ATLAS with the

Re: [Numpy-discussion] Building Numpy: could not read symbols Bad value error

2010-06-16 Thread Robert Kern
On Wed, Jun 16, 2010 at 17:29, Michael Green mishagr...@gmail.com wrote: Bright minds, I'm trying to build Numpy v1.4.1 from source on CentOS 5.2 x64 and running into errors. It seems to be linking error. Regrettably, I don't posses the necessary skill to decipher the error. So your help

Re: [Numpy-discussion] f2py with 4.1 under snow leopard

2010-06-16 Thread David
On 06/17/2010 03:05 AM, Charles سمير Doutriaux wrote: Hi Robert, You're right. I finally figured out which flag was missing I'm posting it here as a reference for others: I needed to add: -undefined dynamic_lookup I also removed -fPIC Hope this helps somebody else. Do you think it

[Numpy-discussion] [ANN] NLopt, a nonlinear optimization library

2010-06-16 Thread Steven G. Johnson
The NLopt library, available from http://ab-initio.mit.edu/nlopt provides a common interface for a large number of algorithms for both global and local nonlinear optimizations, both with and without gradient information, and including both bound constraints and nonlinear