Re: [Numpy-discussion] Sorting large numbers of co-ordinate pairs

2009-03-13 Thread Sturla Molden
If you just want i to be unordered, use numpy.argsort on j. S.M. > I have a large number (> 1bn) of (32-bit) integer co-ordinates (i, j) in a > file. The i are ordered and the j unordered eg. > ... > 6940, 22886 > 6940, 38277 > 6940, 43788 > 7007, 0 > 7007, 2362 > 7007, 34 > etc. > ... > > I w

[Numpy-discussion] Sorting large numbers of co-ordinate pairs

2009-03-13 Thread Dinesh B Vadhia
I have a large number (> 1bn) of (32-bit) integer co-ordinates (i, j) in a file. The i are ordered and the j unordered eg. ... 6940, 22886 6940, 38277 6940, 43788 7007, 0 7007, 2362 7007, 34 etc. ... I want to create (j, i) with j ordered and i unordered and store in a file ie. ... 38277, 567 38