Finding unique maximum values in a list using python
Posted
by mikip
on Stack Overflow
See other posts from Stack Overflow
or by mikip
Published on 2010-03-12T16:45:25Z
Indexed on
2010/03/12
16:47 UTC
Read the original article
Hit count: 185
Hi
I have a list of points as shown below
points=[ [x0,y0,v0], [x1,y1,v1], [x2,y2,v2].......... [xn,yn,vn]]
Some of the points have duplicate x,y values. What I want to do is to extract the unique maximum value x,y points
For example, if I have points [1,2,5] [1,1,3] [1,2,7] [1,7,3]
I would like to obtain the list [1,1,3] [1,2,7] [1,7,3]
How can I do this in python
Thanks
© Stack Overflow or respective owner