[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 equality/inequali

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 thi

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 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 > will be invaluable

[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 fol

[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 which

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

2010-06-16 Thread Robert Kern
2010/6/16 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 poss

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 is

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 wrote: > On Wed, Jun 16, 2010 at 12:30, Vishal Rana 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] >

Re: [Numpy-discussion] Trimming the np arrays

2010-06-16 Thread Robert Kern
On Wed, Jun 16, 2010 at 12:30, Vishal Rana 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 enigma, a harmless en

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 wrote: > On Wed, Jun 16, 2010 at 12:15, Vishal Rana wrote: > > Hi, > > I have a list of np arrays from which I crea

Re: [Numpy-discussion] Trimming the np arrays

2010-06-16 Thread Robert Kern
On Wed, Jun 16, 2010 at 12:15, Vishal Rana 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 Kern "I have come

[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 NumPy-

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

2010-06-16 Thread Robert Kern
2010/6/16 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 t

[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 example

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 wrote: > On Tue, Jun 15, 2010 at 01:56, Vishal Rana 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 object so > does > > that mean the data is read directly fro

Re: [Numpy-discussion] expensive tensordot

2010-06-16 Thread Paul Northug
Dag Sverre Seljebotn 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 > > inef