Hanno Klemm wrote:
> Hi,
> 
> I the following problem: I have a relatively long array of points
> [(x0,y0), (x1,y1), ...]. Apparently, I have some duplicate entries, which
> prevents the Delaunay triangulation algorithm from completing its task.
> 
> Question, is there an efficent way, of getting rid of the duplicate
> entries?
> All I can think of involves loops. 
> 
> Thanks and regards,
> Hanno
> 
> 

One idea is to create a view of the original array with a shape of (N,)
and elements with a dtype that encompases both xn, yn. Then use
numpy.unique() to find the unique entries, and create a view of that
array with your original dtype.

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

Reply via email to