Re: [Numpy-discussion] python array

2014-03-13 Thread Sudheer Joseph
Thank you Olsen, My objective was to find out, how many values are falling under different ranges. ie, find RMS < ,5 and then rms between .5 and .8 etc. If there is a speficic python way of handling mask and making boolean operation with out any doubt, I was look

Re: [Numpy-discussion] GSoC project: draft of proposal

2014-03-13 Thread Leo Mao
On Fri, Mar 14, 2014 at 1:43 AM, alex wrote: > > I think everyone who wants fast numpy linalg already connects to > something like OpenBLAS or MKL. When these are not available, numpy > uses its own "lapack-lite" which is way slower. I don't think you are > going to beat OpenBLAS, so are you sug

Re: [Numpy-discussion] python array

2014-03-13 Thread Brett Olsen
The difference appears to be that the boolean selection pulls out all data values <= 0.5 whether or not they are masked, and then carries over the appropriate masks to the new array. So r2010 and bt contain identical unmasked values but different numbers of masked values. Because the initial fill

Re: [Numpy-discussion] python array

2014-03-13 Thread Sudheer Joseph
Sorry, The below solution I thoght working was not working but was just giving array size. On Fri, 14/3/14, Sudheer Joseph wrote: Subject: Re: [Numpy-discussion] python array To: "Discussion of Numerical Python" Date: Friday, 14 March,

Re: [Numpy-discussion] python array

2014-03-13 Thread Sudheer Joseph
Thank you very much Nicolas and Chris, The hint was helpful and from that I treid below steps ( a crude way I would say) and getting same result now I have been using abs available by default and it is the same with numpy.absolute( i checked). nr= ((r2010>r2010.min(

Re: [Numpy-discussion] python array

2014-03-13 Thread Chris Barker - NOAA Federal
On Mar 13, 2014, at 9:39 AM, Nicolas Rougier wrote: > > Seems to be related to the masked values: Good hint -- a masked array keeps the "junk" values in the main array. What "abs" are you using -- it may not be mask-aware. ( you want a numpy abs anyway) Also -- I'm not sure I know what happens

Re: [Numpy-discussion] GSoC project: draft of proposal

2014-03-13 Thread alex
On Thu, Mar 13, 2014 at 1:35 PM, Leo Mao wrote: >> > And I found that maybe I can also make some functions related to linalg > (like dot, svd or something else) faster by integrating a proper library > into numpy. I think everyone who wants fast numpy linalg already connects to something like Ope

Re: [Numpy-discussion] GSoC project: draft of proposal

2014-03-13 Thread Leo Mao
Hi, Thanks a lot for your advice, Chuck. Following your advice, I have modified my draft of proposal. (attachment) I think it still needs more comments so that I can make it better. And I found that maybe I can also make some functions related to linalg (like dot, svd or something else) faster by

Re: [Numpy-discussion] Removal of doc/numpybook

2014-03-13 Thread Robert Kern
On Thu, Mar 13, 2014 at 5:18 PM, Charles R Harris wrote: > > On Thu, Mar 13, 2014 at 11:08 AM, Robert Kern wrote: >> >> On Thu, Mar 13, 2014 at 5:02 PM, Charles R Harris >> wrote: >> > Hi All, >> > >> > In a note on a PR, Ralf has suggested the removal of doc/numpybook. I >> > believe most of th

Re: [Numpy-discussion] Removal of doc/numpybook

2014-03-13 Thread Charles R Harris
On Thu, Mar 13, 2014 at 11:08 AM, Robert Kern wrote: > On Thu, Mar 13, 2014 at 5:02 PM, Charles R Harris > wrote: > > Hi All, > > > > In a note on a PR, Ralf has suggested the removal of doc/numpybook. I > > believe most of the content is now part of the numpy documentation, and > the > > book i

Re: [Numpy-discussion] Removal of doc/numpybook

2014-03-13 Thread Robert Kern
On Thu, Mar 13, 2014 at 5:02 PM, Charles R Harris wrote: > Hi All, > > In a note on a PR, Ralf has suggested the removal of doc/numpybook. I > believe most of the content is now part of the numpy documentation, and the > book itself is outdated in some parts. Sounds reasonable. It would be good t

[Numpy-discussion] Removal of doc/numpybook

2014-03-13 Thread Charles R Harris
Hi All, In a note on a PR, Ralf has suggested the removal of doc/numpybook. I believe most of the content is now part of the numpy documentation, and the book itself is outdated in some parts. Thoughts? Chuck ___ NumPy-Discussion mailing list NumPy-Dis

Re: [Numpy-discussion] python array

2014-03-13 Thread Nicolas Rougier
Seems to be related to the masked values: print r2010[:3,:3] [[-- -- --] [-- -- --] [-- -- --]] print abs(r2010)[:3,:3] [[-- -- --] [-- -- --] [-- -- --]] print r2010[ r2010[:3,:3] <0 ] [-- -- -- -- -- -- -- -- --] print r2010[ abs(r2010)[:3,:3] < 0] [] Nicolas On 13 Mar 2014, at 16:5

[Numpy-discussion] ANN: SciPy 2014 Conference, July 6th - 12th, Austin, TX!

2014-03-13 Thread Anthony Scopatz
Hello All! I am pleased to announce that *SciPy 2014*, the thirteenth annual *Scientific Computing with Python conference*, will be held this July 6th-12th in Austin, Texas. SciPy is a community dedicated to the advancement of scientific computing through open source Python software for mathematic

[Numpy-discussion] Pickling of memory aliasing patterns

2014-03-13 Thread Eelco Hoogendoorn
I have been working on a general function caching mechanism, and in doing so I stumbled upon the following quirck: @cached def foo(a,b): b[0] = 1 return a[0] a = np.zeros(1) b = a[:] print foo(a, b)#computes and returns 1 print foo(a, b)#gets 1 fro

Re: [Numpy-discussion] GSoC application template available

2014-03-13 Thread Ralf Gommers
On Mon, Mar 10, 2014 at 10:45 PM, Ralf Gommers wrote: > Hi GSoC students, > > The PSF just made their application template for this year available: > https://wiki.python.org/moin/SummerOfCode/ApplicationTemplate2014. There > are a few things in there that are required (for one, submit a patch to >