Re: [Numpy-discussion] lstsq functionality

2010-07-20 Thread Keith Goodman
On Tue, Jul 20, 2010 at 7:16 PM, Skipper Seabold wrote: > On Tue, Jul 20, 2010 at 10:12 PM, Keith Goodman wrote: >> On Tue, Jul 20, 2010 at 6:35 PM, Keith Goodman wrote: >>> On Mon, Jul 19, 2010 at 10:08 PM, Charles R Harris >>> wrote: On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodm

[Numpy-discussion] docstring for numpy.fft

2010-07-20 Thread David Goldsmith
I believe (hope) I've satisfactorily "finished" the docstring for numpy.fft; concerned parties are encouraged to take a look at it in the Wiki and provide comments there in its Discussion section. DG ___ NumPy-Discussion mailing list NumPy-Discussion@sci

Re: [Numpy-discussion] lstsq functionality

2010-07-20 Thread Skipper Seabold
On Tue, Jul 20, 2010 at 10:12 PM, Keith Goodman wrote: > On Tue, Jul 20, 2010 at 6:35 PM, Keith Goodman wrote: >> On Mon, Jul 19, 2010 at 10:08 PM, Charles R Harris >> wrote: >>> >>> >>> On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodman wrote: On Mon, Jul 19, 2010 at 8:27 PM, Charles R H

Re: [Numpy-discussion] lstsq functionality

2010-07-20 Thread Keith Goodman
On Tue, Jul 20, 2010 at 6:35 PM, Keith Goodman wrote: > On Mon, Jul 19, 2010 at 10:08 PM, Charles R Harris > wrote: >> >> >> On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodman wrote: >>> >>> On Mon, Jul 19, 2010 at 8:27 PM, Charles R Harris >>> wrote: >>> > >>> > >>> > On Mon, Jul 19, 2010 at 9:02

Re: [Numpy-discussion] numpy.fft, yet again

2010-07-20 Thread Charles R Harris
On Tue, Jul 20, 2010 at 7:28 PM, David Goldsmith wrote: > On Tue, Jul 20, 2010 at 5:47 PM, David Cournapeau wrote: > >> On Wed, Jul 21, 2010 at 2:02 AM, David Goldsmith >> wrote: >> > On Thu, Jul 15, 2010 at 9:41 AM, David Goldsmith < >> d.l.goldsm...@gmail.com> >> > wrote: >> >> >> >> On Thu, Ju

Re: [Numpy-discussion] lstsq functionality

2010-07-20 Thread Keith Goodman
On Mon, Jul 19, 2010 at 10:08 PM, Charles R Harris wrote: > > > On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodman wrote: >> >> On Mon, Jul 19, 2010 at 8:27 PM, Charles R Harris >> wrote: >> > >> > >> > On Mon, Jul 19, 2010 at 9:02 PM, Keith Goodman >> > wrote: >> >> >> >> On Mon, Jul 19, 2010 at 6

Re: [Numpy-discussion] numpy.fft, yet again

2010-07-20 Thread David Goldsmith
On Tue, Jul 20, 2010 at 5:47 PM, David Cournapeau wrote: > On Wed, Jul 21, 2010 at 2:02 AM, David Goldsmith > wrote: > > On Thu, Jul 15, 2010 at 9:41 AM, David Goldsmith < > d.l.goldsm...@gmail.com> > > wrote: > >> > >> On Thu, Jul 15, 2010 at 3:20 AM, Martin Raspaud > > >> wrote: > >>> > >>> --

Re: [Numpy-discussion] numpy records in C

2010-07-20 Thread Erin Sheldon
On Mon, Jul 19, 2010 at 4:28 PM, Caius Howcroft wrote: > Hi all > > I'm playing with writing some C code to speed up an inner loop in my > python code. This loop operates on a numpy record, e.g. soemthing like > this: > > a = numpy.zeros((10,), dtype=[("myfvalue" ,"float"), ("myc", "int8"), > ("an

Re: [Numpy-discussion] numpy.fft, yet again

2010-07-20 Thread David Cournapeau
On Wed, Jul 21, 2010 at 2:02 AM, David Goldsmith wrote: > On Thu, Jul 15, 2010 at 9:41 AM, David Goldsmith > wrote: >> >> On Thu, Jul 15, 2010 at 3:20 AM, Martin Raspaud >> wrote: >>> >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA1 >>> >>> David Goldsmith skrev: >>> > >>> > >>> >     Inter

Re: [Numpy-discussion] numpy.fft, yet again

2010-07-20 Thread Charles R Harris
On Tue, Jul 20, 2010 at 6:02 PM, David Goldsmith wrote: > On Thu, Jul 15, 2010 at 9:41 AM, David Goldsmith > wrote: > >> On Thu, Jul 15, 2010 at 3:20 AM, Martin Raspaud >> wrote: >> >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA1 >>> >>> David Goldsmith skrev: >>> > >>> > >>> > Interes

Re: [Numpy-discussion] numpy.fft, yet again

2010-07-20 Thread David Goldsmith
On Thu, Jul 15, 2010 at 9:41 AM, David Goldsmith wrote: > On Thu, Jul 15, 2010 at 3:20 AM, Martin Raspaud wrote: > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> David Goldsmith skrev: >> > >> > >> > Interesting comment: it made me run down the fftpack tutorial >> >

Re: [Numpy-discussion] Complete and build the example from the "Using Numpy C-API" documentation.

2010-07-20 Thread Warren Weckesser
Warren Weckesser wrote: > I would like to take the example shown here: > > http://docs.scipy.org/doc/numpy/user/c-info.how-to-extend.html#example > > and complete the code so I can build and test the extension module. Is > that example currently correct? It is slightly different from the older

[Numpy-discussion] Complete and build the example from the "Using Numpy C-API" documentation.

2010-07-20 Thread Warren Weckesser
I would like to take the example shown here: http://docs.scipy.org/doc/numpy/user/c-info.how-to-extend.html#example and complete the code so I can build and test the extension module. Is that example currently correct? It is slightly different from the older example in the numpy book, so so

Re: [Numpy-discussion] lstsq functionality

2010-07-20 Thread Skipper Seabold
On Tue, Jul 20, 2010 at 11:23 AM, Charles R Harris wrote: > > > On Tue, Jul 20, 2010 at 8:32 AM, Skipper Seabold > wrote: >> >> On Tue, Jul 20, 2010 at 1:08 AM, Charles R Harris >> wrote: >> > >> > >> > On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodman >> > wrote: >> >> >> >> On Mon, Jul 19, 2010

Re: [Numpy-discussion] Numpy 1.4.1 fails to build on (Debian) alpha and powepc

2010-07-20 Thread David Cournapeau
On Tue, Jul 20, 2010 at 4:21 PM, Sandro Tosi wrote: > Hi David, > > On Tue, Jul 20, 2010 at 10:34, David Cournapeau wrote: >>> yes, I see it at r8510 >> >> I quickly adapted the code from the Sun math library for the linux ppc >> long double format. Let me know if it works (if possible, you shoul

Re: [Numpy-discussion] lstsq functionality

2010-07-20 Thread Charles R Harris
On Tue, Jul 20, 2010 at 8:32 AM, Skipper Seabold wrote: > On Tue, Jul 20, 2010 at 1:08 AM, Charles R Harris > wrote: > > > > > > On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodman > wrote: > >> > >> On Mon, Jul 19, 2010 at 8:27 PM, Charles R Harris > >> wrote: > >> > > >> > > >> > On Mon, Jul 19, 2

Re: [Numpy-discussion] Stacking arrays along new dimension in front

2010-07-20 Thread Skipper Seabold
On Tue, Jul 20, 2010 at 10:35 AM, Gael Varoquaux wrote: > On Tue, Jul 20, 2010 at 10:24:56AM -0400, Skipper Seabold wrote: >> Will one of the stack functions do?  I take it your a looks something like > >> a = [np.arange(1000), np.arange(1000), np.arange(1000)] > >> np.all(np.vstack(a) == np.conca

Re: [Numpy-discussion] Stacking arrays along new dimension in front

2010-07-20 Thread Gael Varoquaux
On Tue, Jul 20, 2010 at 10:24:56AM -0400, Skipper Seabold wrote: > Will one of the stack functions do? I take it your a looks something like > a = [np.arange(1000), np.arange(1000), np.arange(1000)] > np.all(np.vstack(a) == np.concatenate([a_[None] for a_ in a])) > # True Works only for 1D arra

Re: [Numpy-discussion] Stacking arrays along new dimension in front

2010-07-20 Thread Keith Goodman
On Tue, Jul 20, 2010 at 7:24 AM, Skipper Seabold wrote: > On Tue, Jul 20, 2010 at 5:11 AM, Gael Varoquaux > wrote: >> Is there in numpy a function that does: >> >>    np.concatenate([a_[np.newaxis] for a_ in a]) >> >> ? >> >> ie: add a dimension in front and stack along this dimension, just like

Re: [Numpy-discussion] lstsq functionality

2010-07-20 Thread Skipper Seabold
On Tue, Jul 20, 2010 at 1:08 AM, Charles R Harris wrote: > > > On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodman wrote: >> >> On Mon, Jul 19, 2010 at 8:27 PM, Charles R Harris >> wrote: >> > >> > >> > On Mon, Jul 19, 2010 at 9:02 PM, Keith Goodman >> > wrote: >> >> >> >> On Mon, Jul 19, 2010 at 6:

Re: [Numpy-discussion] Stacking arrays along new dimension in front

2010-07-20 Thread Skipper Seabold
On Tue, Jul 20, 2010 at 5:11 AM, Gael Varoquaux wrote: > Is there in numpy a function that does: > >    np.concatenate([a_[np.newaxis] for a_ in a]) > > ? > > ie: add a dimension in front and stack along this dimension, just like > >    np.array(a) > > would do, but more efficient. > > This is som

Re: [Numpy-discussion] Numpy 1.4.1 fails to build on (Debian) alpha and powepc

2010-07-20 Thread Sandro Tosi
Hi David, On Tue, Jul 20, 2010 at 10:34, David Cournapeau wrote: >> yes, I see it at r8510 > > I quickly adapted the code from the Sun math library for the linux ppc > long double format. Let me know if it works (if possible, you should > run the test suite). thanks for working on it :) I check

[Numpy-discussion] Stacking arrays along new dimension in front

2010-07-20 Thread Gael Varoquaux
Is there in numpy a function that does: np.concatenate([a_[np.newaxis] for a_ in a]) ? ie: add a dimension in front and stack along this dimension, just like np.array(a) would do, but more efficient. This is something that do all the time. Am I the only one? Cheers, Gaël __

Re: [Numpy-discussion] Crosstabulation

2010-07-20 Thread Vincent Schut
On 07/19/2010 10:14 PM, Friedrich Romstedt wrote: > 2010/7/19 sandric ionut: >> For land-use a class would be for example forest, other would be orchard >> etc. For Slope gradient I would have values which<3 and between 3 and 7 >> etc. So, I will have 2 raster data with, let's say, 3 classes each

Re: [Numpy-discussion] Numpy 1.4.1 fails to build on (Debian) alpha and powepc

2010-07-20 Thread David Cournapeau
On Mon, Jul 19, 2010 at 8:44 PM, Sandro Tosi wrote: > > yes, I see it at r8510 I quickly adapted the code from the Sun math library for the linux ppc long double format. Let me know if it works (if possible, you should run the test suite). I will look at the alpha thing later, David __

Re: [Numpy-discussion] Complex128

2010-07-20 Thread Pauli Virtanen
Tue, 20 Jul 2010 08:17:18 +0200, Scott Sinclair wrote: [clip] import numpy as np np.__version__ > '1.4.1' np.array([0,0], dtype='Complex128') > array([0.0+0.0j, 0.0+0.0j], dtype=complex256) np.array([0,0], dtype='Complex64') > array([ 0.+0.j, 0.+0.j]) np.array([0,0], dtype