Re: [Numpy-discussion] Inplace shift

2008-06-06 Thread Anne Archibald
2008/6/6 Keith Goodman <[EMAIL PROTECTED]>: > I'd like to shift the columns of a 2d array one column to the right. > Is there a way to do that without making a copy? > > This doesn't work: > >>> import numpy as np >>> x = np.random.rand(2,3) >>> x[:,1:] = x[:,:-1] >>> x > > array([[ 0.44789223, 0.

Re: [Numpy-discussion] Building 64-bit numpy on OSX

2008-06-06 Thread Michael Abshoff
Charles R Harris wrote: > > > On Fri, Jun 6, 2008 at 3:50 PM, Dan Yamins <[EMAIL PROTECTED] > > wrote: > > > > > > > I'm forced to run it as su. (Is this a bad idea?) > Anyhow, when I > > do run "sudo python setup.py install" in the numpy-1.1.

Re: [Numpy-discussion] Building 64-bit numpy on OSX

2008-06-06 Thread Charles R Harris
On Fri, Jun 6, 2008 at 5:28 PM, Charles R Harris <[EMAIL PROTECTED]> wrote: > > > On Fri, Jun 6, 2008 at 3:50 PM, Dan Yamins <[EMAIL PROTECTED]> wrote: > >> >> >> >> >>> > I'm forced to run it as su. (Is this a bad idea?) Anyhow, when I >>> > do run "sudo python setup.py install" in the numpy

Re: [Numpy-discussion] Building 64-bit numpy on OSX

2008-06-06 Thread Charles R Harris
On Fri, Jun 6, 2008 at 3:50 PM, Dan Yamins <[EMAIL PROTECTED]> wrote: > > > > >> > I'm forced to run it as su. (Is this a bad idea?) Anyhow, when I >> > do run "sudo python setup.py install" in the numpy-1.1.0 directory I >> > downloaded from SciPy website, the build apparently works. >> If y

Re: [Numpy-discussion] Methods accepting out as arguments

2008-06-06 Thread Pierre GM
On Friday 06 June 2008 17:11:03 Alan McIntyre wrote: > >> Here's an automatically generated list from the current numpy trunk. OK, thanks an awful lot ! Now I just have to process your file to get the methods, but that's a nice little exercise. Thx again ! __

Re: [Numpy-discussion] embedded arrays

2008-06-06 Thread Thomas Hrabe
Furthermore, I sometimes get a Segmentation fault Illegal instruction and sometimes it works It might be a memory leak, due to the segfault and the arbitrary behavior.? Best -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] im Auftrag von Thomas Hrabe Gesendet: Fr 06.06.2008 15:10 An:

Re: [Numpy-discussion] embedded arrays

2008-06-06 Thread Robert Kern
On Fri, Jun 6, 2008 at 17:10, Thomas Hrabe <[EMAIL PROTECTED]> wrote: > Hi all, > > while writing a extension module in C++ for python & numpy, I find a strange > error. > > I can send and retrieve numpy arrays to and from my module. > But python stops if I do the following: > > a = numpy.array([[1

[Numpy-discussion] embedded arrays

2008-06-06 Thread Thomas Hrabe
Hi all, while writing a extension module in C++ for python & numpy, I find a strange error. I can send and retrieve numpy arrays to and from my module. But python stops if I do the following: a = numpy.array([[1.1,2,3],[4,5,6]]) PM.put(a,'a') //send a to the module b = PM.get('a') //get a ide

Re: [Numpy-discussion] Building 64-bit numpy on OSX

2008-06-06 Thread Dan Yamins
> > I'm forced to run it as su. (Is this a bad idea?) Anyhow, when I > > do run "sudo python setup.py install" in the numpy-1.1.0 directory I > > downloaded from SciPy website, the build apparently works. > If you were able to install python without sudo you should not need to > use sudo to bu

Re: [Numpy-discussion] Methods accepting out as arguments

2008-06-06 Thread Alan McIntyre
On Fri, Jun 6, 2008 at 4:50 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > On Fri, Jun 6, 2008 at 1:41 PM, Alan McIntyre <[EMAIL PROTECTED]> wrote: >> Here's an automatically generated list from the current numpy trunk. >> >> I should really post the script I used to make this somewhere. >> Anybody

Re: [Numpy-discussion] Methods accepting out as arguments

2008-06-06 Thread Keith Goodman
On Fri, Jun 6, 2008 at 1:41 PM, Alan McIntyre <[EMAIL PROTECTED]> wrote: > Here's an automatically generated list from the current numpy trunk. > > I should really post the script I used to make this somewhere. > Anybody have any suggestions on a good place to put it? I don't know where to put it

Re: [Numpy-discussion] Methods accepting out as arguments

2008-06-06 Thread Alan McIntyre
Here's an automatically generated list from the current numpy trunk. I should really post the script I used to make this somewhere. Anybody have any suggestions on a good place to put it? On Fri, Jun 6, 2008 at 3:54 PM, Pierre GM <[EMAIL PROTECTED]> wrote: > Folks, > Where could I find a list of

Re: [Numpy-discussion] Methods accepting out as arguments

2008-06-06 Thread Charles R Harris
On Fri, Jun 6, 2008 at 1:54 PM, Pierre GM <[EMAIL PROTECTED]> wrote: > Folks, > Where could I find a list of the ndarray methods accepting out as an > argument ? Alan McIntyre was working on that. I don't know what the current status of the list is. Chuck ___

[Numpy-discussion] Methods accepting out as arguments

2008-06-06 Thread Pierre GM
Folks, Where could I find a list of the ndarray methods accepting out as an argument ? Thx a lot in advance. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Inplace shift

2008-06-06 Thread Robert Kern
On Fri, Jun 6, 2008 at 2:08 PM, Zachary Pincus <[EMAIL PROTECTED]> wrote: >> I'd like to shift the columns of a 2d array one column to the right. >> Is there a way to do that without making a copy? > > I think what you want is numpy.roll? It doesn't work inplace. It creates a new array, thereby ef

Re: [Numpy-discussion] Inplace shift

2008-06-06 Thread Zachary Pincus
> I'd like to shift the columns of a 2d array one column to the right. > Is there a way to do that without making a copy? I think what you want is numpy.roll? Definition: numpy.roll(a, shift, axis=None) Docstring: Roll the elements in the array by 'shift' positions along the given

[Numpy-discussion] Inplace shift

2008-06-06 Thread Keith Goodman
I'd like to shift the columns of a 2d array one column to the right. Is there a way to do that without making a copy? This doesn't work: >> import numpy as np >> x = np.random.rand(2,3) >> x[:,1:] = x[:,:-1] >> x array([[ 0.44789223, 0.44789223, 0.44789223], [ 0.80600897, 0.80600897,

Re: [Numpy-discussion] Building 64-bit numpy on OSX

2008-06-06 Thread Michael Abshoff
Dan Yamins wrote: Hi Dan, > >./configure --disable-toolbox-glue > --prefix=/Users/mabshoff/64bitnumpy/python-2.5.2-bin --with-gcc="gcc > -m64" > > > Let's build numpy 1.1.0: > > bsd:64bitnumpy mabshoff$ tar xf numpy-1.1.0.tar.gz > bsd:64bitnumpy mabshoff$ cd numpy-1.1.0 > bsd:num

Re: [Numpy-discussion] calculating the mean and variance of a large float vector

2008-06-06 Thread Bruce Southey
Bruce Southey wrote: > Alan McIntyre wrote: >> On Thu, Jun 5, 2008 at 10:16 PM, Keith Goodman <[EMAIL PROTECTED]> >> wrote: >> >>> How can that lead to instability? If the last half-million values are >>> small then they won't have a big impact on the mean even if they are >>> ignored. The varia

Re: [Numpy-discussion] calculating the mean and variance of a large float vector

2008-06-06 Thread Bruce Southey
Alan McIntyre wrote: > On Thu, Jun 5, 2008 at 10:16 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > >> How can that lead to instability? If the last half-million values are >> small then they won't have a big impact on the mean even if they are >> ignored. The variance is a mean too (of the squar

Re: [Numpy-discussion] Building 64-bit numpy on OSX

2008-06-06 Thread Dan Yamins
>./configure --disable-toolbox-glue --prefix=/Users/mabshoff/64bitnumpy/python-2.5.2-bin --with-gcc="gcc -m64" > Let's build numpy 1.1.0: > > bsd:64bitnumpy mabshoff$ tar xf numpy-1.1.0.tar.gz > bsd:64bitnumpy mabshoff$ cd numpy-1.1.0 > bsd:numpy-1.1.0 mabshoff$ python setup.py install > > > Mi

[Numpy-discussion] ANN: SciPy 2008 Conference

2008-06-06 Thread Jarrod Millman
Greetings, The SciPy 2008 Conference website is now open: http://conference.scipy.org This year's conference will be at Caltech from August 19-24: Tutorials:August 19-20 (Tuesday and Wednesday) Conference: August 21-22 (Thursday and Friday) Sprints: August 23-24 (Saturday and