Changeset 744 for trunk/delaunay/tests
- Timestamp:
- 01/16/08 23:52:16 (4 years ago)
- Files:
-
- 1 modified
-
trunk/delaunay/tests/test_triangulate.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/delaunay/tests/test_triangulate.py
r547 r744 1 1 from scikits import delaunay as dlny 2 2 from numpy import random 3 import scipy as sp3 import numpy as np 4 4 5 5 def onright(x0, y0, x1, y1, x, y): … … 13 13 with radius r. 14 14 """ 15 r2 = sp.hypot(x-cx, y-cy)15 r2 = np.hypot(x-cx, y-cy) 16 16 assert r2 < r 17 17 … … 32 32 assert tri.edge_db.shape == (nedges, 2) 33 33 assert tri.circumcenters.shape == (ntriangles, 2) 34 assert sp.sum((tri.triangle_neighbors == -1).astype(sp.int32).flat) == k34 assert np.sum((tri.triangle_neighbors == -1).astype(np.int32).flat) == k 35 35 36 36 def test_ccw_triangles(self): … … 63 63 r2 = ((x[i] - tri.circumcenters[:,0])**2 64 64 + (y[i] - tri.circumcenters[:,1])**2) 65 alldist2 = ( sp.subtract.outer(x, tri.circumcenters[:,0])**266 + sp.subtract.outer(y, tri.circumcenters[:,1])**2)65 alldist2 = (np.subtract.outer(x, tri.circumcenters[:,0])**2 66 + np.subtract.outer(y, tri.circumcenters[:,1])**2) 67 67 good = (r2 <= (alldist2 + 1e-12)) 68 assert sp.alltrue(good)68 assert np.alltrue(good)
