Re: [Numpy-discussion] fink python26 and numpy 1.2.1

2008-11-02 Thread David Cournapeau
Michael Abshoff wrote: > > Unfortunately numpy 1.2.x does not support Python 2.6. IIRC support is > planned for numpy 1.3. > Also it is true it is not supported, it should at least build on most if not all platforms where numpy used to run under python 2.5. Not finding -lpython2.6 is more lik

Re: [Numpy-discussion] computing average distance

2008-11-02 Thread Paul Rudin
Gael Varoquaux <[EMAIL PROTECTED]> writes: > Hey Emmanuelle, ( :>) > > On Sun, Nov 02, 2008 at 08:39:39PM +0100, Emmanuelle Gouillart wrote: Thanks both of you. >this will avoid what seems to be an error in Emmanuelle's answer. By >the way, I am not too sure why Paul has used a numpy.ar

Re: [Numpy-discussion] fink python26 and numpy 1.2.1

2008-11-02 Thread Michael Abshoff
Gideon Simpson wrote: > Not sure if this is an issue with numpy or an issue with fink python > 2.6, but when trying to build numpy, I get the following error: Unfortunately numpy 1.2.x does not support Python 2.6. IIRC support is planned for numpy 1.3. > gcc -L/sw/lib -bundle /sw/lib/python2.6

[Numpy-discussion] fink python26 and numpy 1.2.1

2008-11-02 Thread Gideon Simpson
Not sure if this is an issue with numpy or an issue with fink python 2.6, but when trying to build numpy, I get the following error: gcc -L/sw/lib -bundle /sw/lib/python2.6/config -lpython2.6 build/ temp.macosx-10.5-i386-2.6/numpy/core/src/multiarraymodule.o -o build/ lib.macosx-10.5-i386-2.6/

Re: [Numpy-discussion] computing average distance

2008-11-02 Thread Gael Varoquaux
Hey Emmanuelle, ( :>) On Sun, Nov 02, 2008 at 08:39:39PM +0100, Emmanuelle Gouillart wrote: > although I'm not an expert either, it seems to me you could improve your > code a lot by using numpy.mgrid > Below is a short example of what you could do > coordinates = numpy.mgrid[0:R, 0:R, 0:R] > X,

Re: [Numpy-discussion] Installation Trouble

2008-11-02 Thread T J
Sorrywrong list. On Sun, Nov 2, 2008 at 11:34 AM, T J <[EMAIL PROTECTED]> wrote: > Hi, > > I'm having trouble installing PyUblas 0.93.1 (same problems from the > current git repository). I'm in ubuntu 8.04 with standard boost > packages (1.34.1, I believe). Do you have any suggestions? > > T

Re: [Numpy-discussion] computing average distance

2008-11-02 Thread Emmanuelle Gouillart
Hello Paul, although I'm not an expert either, it seems to me you could improve your code a lot by using numpy.mgrid Below is a short example of what you could do coordinates = numpy.mgrid[0:R, 0:R, 0:R] X, Y, Z = coordinates[0].ravel(), coordinates[1].ravel(),coordinates[2].ravel() bits = self.

Re: [Numpy-discussion] numpy function to compute sample ranks

2008-11-02 Thread Wes McKinney
Try rankdata in scipy.stats On Nov 2, 2008, at 1:35 PM, Keith Goodman wrote: > On Sun, Nov 2, 2008 at 10:24 AM, Abhimanyu Lad > <[EMAIL PROTECTED]> wrote: >> Is there a direct or indirect way in numpy to compute the sample >> ranks of a >> given array, i.e. the equivalent of rank() in R. >> >

[Numpy-discussion] computing average distance

2008-11-02 Thread Paul Rudin
I'm experimenting with numpy and I've just written the code below, which computes the thing I want (I think). Self.bits is an RxRxR array representing a voxelized 3d model - values are either 0 or 1. I can't help thinking that's there must be a much nicer way to do it. Any suggestions? centre =

Re: [Numpy-discussion] numpy function to compute sample ranks

2008-11-02 Thread Keith Goodman
On Sun, Nov 2, 2008 at 10:24 AM, Abhimanyu Lad <[EMAIL PROTECTED]> wrote: > Is there a direct or indirect way in numpy to compute the sample ranks of a > given array, i.e. the equivalent of rank() in R. > > I am looking for: > rank(array([6,8,4,1,9])) -> array([2,3,1,0,4]) > > Is there some clever

[Numpy-discussion] numpy function to compute sample ranks

2008-11-02 Thread Abhimanyu Lad
Hi, Is there a direct or indirect way in numpy to compute the sample ranks of a given array, i.e. the equivalent of rank() in R. I am looking for: rank(array([6,8,4,1,9])) -> array([2,3,1,0,4]) Is there some clever use of argsort() that I am missing? Thanks, Abhi _