[SciPy-user] Sort 3-D arrays by two columns

Thomas Nauss nauss@lcrs...
Fri Mar 16 05:16:55 CDT 2007


Thank's a lot! That helps.
Thomas

Tom Denniston wrote:
> I think you want lexsort.  It takes a tuple of columns.
> 
> On 3/14/07, Bill Baxter <wbaxter@gmail.com> wrote:
>> Does lexsort  do what you need?
>>
>> Also, have you seen the numpy examples list?  It's a good place to
>> look for this sort of thing:
>> http://www.scipy.org/Numpy_Example_List
>> http://www.scipy.org/Numpy_Example_List_With_Doc
>>
>> --bb
>>
>> On 3/14/07, Thomas Nauss <nauss@lcrs.de> wrote:
>>> Dear Experts,
>>> I want plot some satellite datasets using matplotlib with basemap. For
>>> that task, I need a 3-D array (or three 1-D arrays) containing latitude,
>>> longitude, and corresponding data values. Since basemap needs latitude
>>> and longitude values in increasing order, I'm looking for a function to
>>> sort the 3-D array by the two lat/lon columns (i.e. first by latitude,
>>> then by longitude but conserving the value combinations).
>>> Thanks,
>>> Thomas
>>>
>>> _______________________________________________
>>> SciPy-user mailing list
>>> SciPy-user@scipy.org
>>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>>
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user@scipy.org
>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
> 

-- 

_____________________________________________
Dr. Thomas Nauss
Philipps-University of Marburg
Department of Geography
Laboratory for Climatology and Remote Sensing
Deutschhausstr. 10
D-35032 Marburg
fon:   ++49(6421)2824252
fax:   ++49(6421)2828950
mobile:++49(163)1462714
mail:  nauss@lcrs.de
web:   http://www.lcrs.de


More information about the SciPy-user mailing list