Re: Efficiently removing duplicate rows from a 2-dimensional Numeric array

2007-07-20 Thread Zentrader
On Jul 19, 8:35 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "Alex Mont" <[EMAIL PROTECTED]> wrote in message > 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

Re: Efficiently removing duplicate rows from a 2-dimensional Numeric array

2007-07-19 Thread Terry Reedy
"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]]. ===

Re: Efficiently removing duplicate rows from a 2-dimensional Numeric array

2007-07-19 Thread Matt McCredie
Could you use a set of tuples? set([(1,2),(1,3),(1,2),(2,3)]) set([(1, 2), (1, 3), (2, 3)]) Matt On 7/19/07, Alex Mont <[EMAIL PROTECTED]> wrote: 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 wit

Efficiently removing duplicate rows from a 2-dimensional Numeric array

2007-07-19 Thread Alex Mont
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]]. (Order of the rows doesn't matter, although order of the two el