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
"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]].
===
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
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