Re: [Numpy-discussion] Easy module installation with less human intervention.

2012-01-21 Thread Olivier Delalleau
You can try easy_install or pip. -=- Olivier 2012/1/21 Peng Yu > Hi, > > > Perl has something like ppm so that I can just use one command to > download and install perl modules. But I don't find such thing in > python. As shown on http://docs.python.org/install/index.html, it > seems that I hav

[Numpy-discussion] Easy module installation with less human intervention.

2012-01-21 Thread Peng Yu
Hi, Perl has something like ppm so that I can just use one command to download and install perl modules. But I don't find such thing in python. As shown on http://docs.python.org/install/index.html, it seems that I have to download the packages first unzip it then install it. I'm wondering if the

[Numpy-discussion] The NumPy Mandelbrot code 16x slower than Fortran

2012-01-21 Thread Ondřej Čertík
Hi, I read the Mandelbrot code using NumPy at this page: http://mentat.za.net/numpy/intro/intro.html but when I run it, it gives me integer overflows. As such, I have fixed the code, so that it doesn't overflow here: https://gist.github.com/1655320 and I have also written an equivalent Fortran

Re: [Numpy-discussion] Cross-covariance function

2012-01-21 Thread josef . pktd
On Sat, Jan 21, 2012 at 6:26 PM, John Salvatier wrote: > I ran into this a while ago and was confused why cov did not behave the way > pierre suggested. same here, When I rewrote scipy.stats.spearmanr, I matched the numpy behavior for two arrays, while R only returns the cross-correlation part.

Re: [Numpy-discussion] Cross-covariance function

2012-01-21 Thread John Salvatier
I ran into this a while ago and was confused why cov did not behave the way pierre suggested. On Jan 21, 2012 12:48 PM, "Elliot Saba" wrote: > Thank you Sturla, that's exactly what I want. > > I'm sorry that I was not able to reply for so long, but Pierre's code is > similar to what I have alread

Re: [Numpy-discussion] Cross-covariance function

2012-01-21 Thread Elliot Saba
Thank you Sturla, that's exactly what I want. I'm sorry that I was not able to reply for so long, but Pierre's code is similar to what I have already implemented, and I am in support of changing the functionality of cov(). I am unaware of any arguments for a covariance function that works in this

[Numpy-discussion] views and mask NA

2012-01-21 Thread Charles R Harris
Hi All, I'd like some feedback on how mask NA should interact with views. The immediate problem is how to deal with the real and imaginary parts of complex numbers. If the original has a masked value, it should show up as masked in the real and imaginary parts. But what should happen on assignment

Re: [Numpy-discussion] Counting the Colors of RGB-Image

2012-01-21 Thread Torgil Svensson
unique has an option to get indexes out which you can use in combination with sort to get the actual counts out. tab0 = zeros( 256*256*256 , dtype=int) col=ravel(((im0[...,0].astype('u4')*256+im0[...,1])*256)+im0[...,2]) col,idx=unique(sort(col),True) idx=hstack([idx,[2500*2500]]) tab0[col]=idx[1: