Re: [Numpy-discussion] Getting 3-D array values from a 2-D array of indexes

2007-01-09 Thread Robert Kern
Jordan Dawe wrote: > I have a 3D array A of shape (nz, ny, nx) and a 2D array B of shape (ny, > nx) that contains integer indexes. I want to generate a 2D array C of > shape (ny, nx) composed of the values of A at the z-indexes specified in > B. Is there an easy way to do this? An alternative

Re: [Numpy-discussion] recompiling needed for binary module after numpy 1.0

2007-01-09 Thread Robert Kern
Erin Sheldon wrote: > I'm finally getting to this, I'm on the road. Here is > what gdb gives me > > --snip-- > Reading symbols for shared libraries . done > Reading symbols for shared libraries . done > Reading symbols for shared libraries .. done > > Program received signal EXC_BAD_ACCESS, Coul

Re: [Numpy-discussion] recompiling needed for binary module after numpy 1.0

2007-01-09 Thread Erin Sheldon
I'm finally getting to this, I'm on the road. Here is what gdb gives me --snip-- Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries .. done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVA

Re: [Numpy-discussion] reduction

2007-01-09 Thread Travis Oliphant
Charles R Harris wrote: > > > On 1/8/07, *Robert Kern* <[EMAIL PROTECTED] > > wrote: > > lorenzo bolla wrote: > > ops. I did it, too. > > should I delete it?? how?? > > I closed it as a duplicate. As a nondeveloper, you don't have the > permissions to

Re: [Numpy-discussion] reduction

2007-01-09 Thread Travis Oliphant
Charles R Harris wrote: > > > On 1/8/07, *Robert Kern* <[EMAIL PROTECTED] > > wrote: > > lorenzo bolla wrote: > > ops. I did it, too. > > should I delete it?? how?? > > I closed it as a duplicate. As a nondeveloper, you don't have the > permissions to

Re: [Numpy-discussion] reduction

2007-01-09 Thread Travis Oliphant
Charles R Harris wrote: > > > On 1/8/07, *Robert Kern* <[EMAIL PROTECTED] > > wrote: > > lorenzo bolla wrote: > > ops. I did it, too. > > should I delete it?? how?? > > I closed it as a duplicate. As a nondeveloper, you don't have the > permissions to

Re: [Numpy-discussion] Where's append in NumPy?? Can't Installing NumPy.

2007-01-09 Thread Lou Pecora
Ah, that does ring a bell. Sigh. I need to upgrade my memory banks. Sure is tough keeping these packages in sync. Thanks. I'll check it out. --- Robert Kern <[EMAIL PROTECTED]> wrote: > Lou Pecora wrote: > > > /usr/local/bin/g77 -g -Wall -undefined > > dynamic_lookup...blah, > > blah.../sci

Re: [Numpy-discussion] Where's append in NumPy?? Can't Installing NumPy.

2007-01-09 Thread Robert Kern
Lou Pecora wrote: > /usr/local/bin/g77 -g -Wall -undefined > dynamic_lookup...blah, > blah.../scipy/fftpack/_fftpack.so > > /usr/bin/ld: can't locate file for: -lcc_dynamic Yup. You can't use g77 with gcc 4. See the instructions I give in the thread "recompiling needed for binary module after nu

Re: [Numpy-discussion] Where's append in NumPy?? Can't Installing NumPy.

2007-01-09 Thread Lou Pecora
Hi, Chris, Some answers below (sort of): --- Christopher Barker <[EMAIL PROTECTED]> wrote: > Lou, > > This is odd. I've always been able to do it. I sure > wish Apple had > provided a decent package management system! Amen! > I have a dmg for 1.0.1 that seems to work well. I > wonder where

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-09 Thread Perry Greenfield
A few comments regarding what I think justifies some sort of standard to be part of Python (understanding that there are various ways that it could be done, so I'm not commenting on the specifics here directly). I don't there is any harm in making the standard numpy-centric. In fact, I think

Re: [Numpy-discussion] Latest Array-Interface PEP

2007-01-09 Thread Timothy Hochberg
On 1/9/07, Christopher Barker <[EMAIL PROTECTED]> wrote: Timothy Hochberg wrote: > The reason that I ask is that the two projects that I use regularly are > wxPython and PIL generally operate on relatively large data chunks and > it's not clear that they would see much benefit over this mechanis

Re: [Numpy-discussion] Where's append in NumPy?? Can't Installing NumPy.

2007-01-09 Thread Christopher Barker
Lou, This is odd. I've always been able to do it. I sure wish Apple had provided a decent package management system! I have a dmg for 1.0.1 that seems to work well. I wonder where I got it? $ python2.4 Python 2.4.3 (#1, Apr 7 2006, 10:54:33) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on dar

Re: [Numpy-discussion] reduction

2007-01-09 Thread Charles R Harris
On 1/8/07, Robert Kern <[EMAIL PROTECTED]> wrote: lorenzo bolla wrote: > ops. I did it, too. > should I delete it?? how?? I closed it as a duplicate. As a nondeveloper, you don't have the permissions to close tickets yourself. Now that this bug is closed, maybe we should make another point r

Re: [Numpy-discussion] Exported symbols and code reorganization.

2007-01-09 Thread Charles R Harris
On 1/9/07, David Cournapeau <[EMAIL PROTECTED]> wrote: Charles R Harris wrote: > > > On 1/7/07, *Robert Kern* <[EMAIL PROTECTED] > > wrote: > > Charles R Harris wrote: > > > > > No, but as with mtrand, most of those arise from the fact that > these function

[Numpy-discussion] Need help for implementing a fast clip in numpy (was slow clip)

2007-01-09 Thread David Cournapeau
Hi, I am finally implementing a C function to replace the current slow implementation of clip in python as promised a few weeks ago. The idea is to implement it as the following: def clip(input, min, max): a = input.copy() putmask(a, a <= min, min) putmask(a, a >= max, max)

Re: [Numpy-discussion] Where's append in NumPy?? Can't Installing NumPy.

2007-01-09 Thread Lou Pecora
--- Lou Pecora <[EMAIL PROTECTED]> wrote: > That may be it. I'll get a newer version. > No Luck. I downloaded numpy-1.0-py2.4-macosx10.4.dmg from the MacOSX package site, but the installer kept telling me there was nothing to install. I removed the previous NumPy and numpy.pth from the si

Re: [Numpy-discussion] Where's append in NumPy??

2007-01-09 Thread Lou Pecora
That may be it. I'll get a newer version. --- Robert Kern <[EMAIL PROTECTED]> wrote: > Lou Pecora wrote: > > After import numpy as N > > > > In [10]: print N.__version__ > > 1.1.2881 > > > > does that look right as a recent version? > > No, that's very old. The version number had briefly > go

Re: [Numpy-discussion] Getting 3-D array values from a 2-D array of indexes

2007-01-09 Thread Pau Gargallo
On 1/9/07, Jordan Dawe <[EMAIL PROTECTED]> wrote: > I have a 3D array A of shape (nz, ny, nx) and a 2D array B of shape (ny, > nx) that contains integer indexes. I want to generate a 2D array C of > shape (ny, nx) composed of the values of A at the z-indexes specified in > B. Is there an easy way

Re: [Numpy-discussion] Exported symbols and code reorganization.

2007-01-09 Thread David Cournapeau
Charles R Harris wrote: > > > On 1/7/07, *Robert Kern* <[EMAIL PROTECTED] > > wrote: > > Charles R Harris wrote: > > > > > No, but as with mtrand, most of those arise from the fact that > these functions > are implemented in files other than the C file th

Re: [Numpy-discussion] recompiling needed for binary module after numpy 1.0

2007-01-09 Thread Robert Kern
belinda thom wrote: > Hi, > > I am hopefully almost done w/this exercise, but am uncertain how to > interpret what the "---, +++, @@ -48,7" etc. I've looked at the > setupext.py file on my machine but am unclear what changes I need to > make. > > I tried google to find some interpretation,

Re: [Numpy-discussion] recompiling needed for binary module after numpy 1.0

2007-01-09 Thread belinda thom
Hi, I am hopefully almost done w/this exercise, but am uncertain how to interpret what the "---, +++, @@ -48,7" etc. I've looked at the setupext.py file on my machine but am unclear what changes I need to make. I tried google to find some interpretation, but was not successful. I'm somewh