"Alex Mont" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I have a 2-dimensional Numeric array with the shape (2,N) and I want to remove all duplicate rows from the array. For example if I start out with: [[1,2], [1,3], [1,2], [2,3]]
I want to end up with [[1,2], [1,3], [2,3]]. ================================================= If you can define a 1-1 map of rows to ints (or even float or strings), you can put intsnumbers into a set and then convert (unique) items back to rows. For example above, the obvious 10*r[0] + r[1] would do. So would chr(r[0]) + chr(r[1]). More generally, you need the min and max of the second numbers and not have them be too far apart/ tjr -- http://mail.python.org/mailman/listinfo/python-list