Re: [Numpy-discussion] distutils issue - python 3.1 on windows

2010-08-02 Thread David
On 08/03/2010 02:57 AM, Pauli Virtanen wrote: > Mon, 02 Aug 2010 12:52:12 -0500, Robert Kern wrote: > [clip] >> I believe we avoided the inspect module because it is quite expensive to >> import. It may not matter inside numpy.distutils, but be wary of >> "fixing" things to use inspect elsewhere. I

Re: [Numpy-discussion] numpy.vectorize fails, howto avoid hardcoding parameters?

2010-08-02 Thread josef . pktd
On Mon, Aug 2, 2010 at 3:35 PM, Alex Kraus wrote: > > Hi, > > I am trying to create a function that calculates the integral of another > function. The integral function should later be used in > scipy.optimize.leastsq(f, ...), so ideally it should have the format: > > def f(x, *param) > > so tha

[Numpy-discussion] numpy.vectorize fails, howto avoid hardcoding parameters?

2010-08-02 Thread Alex Kraus
Hi, I am trying to create a function that calculates the integral of another function. The integral function should later be used in scipy.optimize.leastsq(f, ...), so ideally it should have the format: def f(x, *param) so that it works for a variable number of parameters. While my code works

[Numpy-discussion] accumulated sum-of-squared-differences

2010-08-02 Thread Gregory, Matthew
Hi all, I'm trying to calculate accumulated sum-of-squared-differences for an array in the following manner: import numpy as np a = np.array([1, 2, 3, 49., 50, 51, 98, 99, 100], dtype=np.float32) # Calculate accumulated means over all elements means = np.add.accumulate(a) / (np.arange(a.size) +

Re: [Numpy-discussion] distutils issue - python 3.1 on windows

2010-08-02 Thread Pauli Virtanen
Mon, 02 Aug 2010 12:52:12 -0500, Robert Kern wrote: [clip] > I believe we avoided the inspect module because it is quite expensive to > import. It may not matter inside numpy.distutils, but be wary of > "fixing" things to use inspect elsewhere. It would be worth extracting > the commonly-used piece

Re: [Numpy-discussion] distutils issue - python 3.1 on windows

2010-08-02 Thread Robert Kern
On Mon, Aug 2, 2010 at 12:48, Pauli Virtanen wrote: > Mon, 02 Aug 2010 23:48:52 +0800, Ralf Gommers wrote: >> I'm trying to get building to work with Python 3.1 under Wine on OS X. >> The first thing you run into is a python distutils problem, which is >> fixed by replacing line 379 of  cygwinccom

Re: [Numpy-discussion] distutils issue - python 3.1 on windows

2010-08-02 Thread Pauli Virtanen
Mon, 02 Aug 2010 23:48:52 +0800, Ralf Gommers wrote: > I'm trying to get building to work with Python 3.1 under Wine on OS X. > The first thing you run into is a python distutils problem, which is > fixed by replacing line 379 of cygwinccompiler.py with > result = RE_VERSION.search(str(out_str

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 1

2010-08-02 Thread Pauli Virtanen
Mon, 02 Aug 2010 10:24:33 -0700, Erik Tollerud wrote: > When I try to build in 3.1.1 (on Ubuntu 9.10) straight from > numpy-1.5.0b1.tar.gz, I get an "ImportError: No module named py3tool" - > is this an external dependency, or is it supposed to be included in the > source distribution? It's suppos

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 1

2010-08-02 Thread Erik Tollerud
When I try to build in 3.1.1 (on Ubuntu 9.10) straight from numpy-1.5.0b1.tar.gz, I get an "ImportError: No module named py3tool" - is this an external dependency, or is it supposed to be included in the source distribution? On Sun, Aug 1, 2010 at 9:38 AM, Ralf Gommers wrote: > I am pleased to an

[Numpy-discussion] distutils issue - python 3.1 on windows

2010-08-02 Thread Ralf Gommers
Hi, I'm trying to get building to work with Python 3.1 under Wine on OS X. The first thing you run into is a python distutils problem, which is fixed by replacing line 379 of cygwinccompiler.py with result = RE_VERSION.search(str(out_string)) The next thing I run into is a numpy.distutils is