Re: [Numpy-discussion] numpy sort is not working

2012-09-11 Thread Anthony Scopatz
On Tue, Sep 11, 2012 at 12:52 AM, Jadhav, Alok alok.jad...@credit-suisse.com wrote: Hi Travis, ** ** Very Strange. I am on version 1.6.2 L What could I be missing. I started using numpy quite recently. Is there a way to share the data with you? Hi Alok, Typically, a

Re: [Numpy-discussion] numpy sort is not working

2012-09-11 Thread Jadhav, Alok
Anthony, Travis, I understand how an example that generates the data would be useful but it will be difficult to provide this in my case for following reasons - Data is read from hdf5 files (50 MB) - Attaching the code which is used to generate the data. It may provide some

[Numpy-discussion] status of 'present' to use optional parameters in f2py

2012-09-11 Thread Mark Bakker
Hello List, I searched the list whether it is possible to use optional arguments in fortran functions that are compiled with f2py. In 2008, this feature was not yet included and appeared to be non-trivial. Does anybody know the status of putting that feature in f2py? Thanks, Mark

Re: [Numpy-discussion] easy way to change part of only unmasked elements value?

2012-09-11 Thread Richard Hattersley
Hi Chao, If you don't mind modifying masked values, then if you write to the underlying ndarray it won't touch the mask: a = np.ma.masked_less(np.arange(10),5) a.base[3:6] = 1 a masked_array(data = [-- -- -- -- -- 1 6 7 8 9], mask = [ True True True True True False False

Re: [Numpy-discussion] numpy sort is not working

2012-09-11 Thread Travis Oliphant
I am wondering of this has to do with the size of the array. It looks like the array is sorted --- but in chunks. -- Travis Oliphant (on a mobile) 512-826-7480 On Sep 10, 2012, at 10:46 PM, Jadhav, Alok alok.jad...@credit-suisse.com wrote: Hi everyone, I have a numpy array of

Re: [Numpy-discussion] numpy sort is not working

2012-09-11 Thread Jadhav, Alok
The sorted array you see is the same as original array. I have replied to code to generate the below data. (done in a loop. Each loop generates sorted numpy arrayas it reads from file) and combines all arrays into a single numpy array. I need to sort the final array into a single sorted array.

Re: [Numpy-discussion] easy way to change part of only unmasked elements value?

2012-09-11 Thread Chao YUE
Dear Richard, this is what I want. Thanks! Chao On Tue, Sep 11, 2012 at 3:19 PM, Richard Hattersley rhatters...@gmail.comwrote: Hi Chao, If you don't mind modifying masked values, then if you write to the underlying ndarray it won't touch the mask: a = np.ma.masked_less(np.arange(10),5)