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 want to create (j, i) with j ordered and i unordered and store in a file
> ie.
> ...
> 38277, 567
> 38277, 90023
> 38277, 6940
> 43788, 5672
> 43788, 98
> etc
> ...
>
> My computers have sufficient memory (2gb on one and 8gb on another).
>
> Any ideas how I could do this using numpy?
>
> Dinesh
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>


_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to