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]])
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
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 staticfl...@gmail.com 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
On Sat, Jan 21, 2012 at 6:26 PM, John Salvatier
jsalv...@u.washington.edu 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
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
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
You can try easy_install or pip.
-=- Olivier
2012/1/21 Peng Yu pengyu...@gmail.com
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