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 to

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 gotten bumped to

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 site

[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] 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] mailto:[EMAIL PROTECTED] wrote: Charles R Harris wrote: snip No, but as with mtrand, most of those arise from the fact that these functions are

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

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

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 I got

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 numpy

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,