[Scipy-tickets] [SciPy] #376: [PATCH] sandbox.delaunay crashes on duplicate points

SciPy scipy-tickets@scipy....
Wed Feb 27 14:36:57 CST 2008


#376: [PATCH] sandbox.delaunay crashes on duplicate points
--------------------+-------------------------------------------------------
 Reporter:  pv      |        Owner:  somebody
     Type:  defect  |       Status:  new     
 Priority:  normal  |    Milestone:  0.7     
Component:  Other   |      Version:  0.5.2   
 Severity:  normal  |   Resolution:          
 Keywords:          |  
--------------------+-------------------------------------------------------
Comment (by nils):

 delaunay is now a scikit.

 {{{
 from scikits.delaunay import Triangulation
 import scipy as S

 x  = S.array([7, 8, 9, 7, 8, 9], dtype=S.float64)
 y  = S.array([0, 0, 0, 1, 1, 1], dtype=S.float64)

 xp = S.r_[x, x + 1e-16] # xp differs from x by epsilon
 yp = S.r_[y, y]

 print "%.20g %.20g" % (x[-1], xp[-1])

 def test_1():
     tri = Triangulation(x, y)
     print "Test 1 OK"

 def test_2():
     tri = Triangulation(xp, yp)
     print "Test 2 OK"

 test_1()
 test_2()
 }}}


 {{{
 /usr/bin/python -i test_delaunay.py
 9 9
 Test 1 OK
 /usr/lib/python2.4/site-packages/scikits/delaunay/triangulate.py:78:
 DuplicatePointWarning: Input data contains duplicate x,y points; some
 values are ignored.
   DuplicatePointWarning,
 Test 2 OK
 }}}

-- 
Ticket URL: <http://scipy.org/scipy/scipy/ticket/376#comment:6>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list