@@ -44,8 +44,10 @@ def area(command, surface_file, verbose=False):
4444 >>> command = os.path.join(ccode_path, 'area', 'PointAreaMain')
4545 >>> area_file = area(command, surface_file, verbose)
4646 >>> scalars, name = read_scalars(area_file)
47- >>> [np.float("{0:.{1}f}".format(x, 5)) for x in scalars[0:8]]
48- [0.4827, 0.39661, 0.57813, 0.70574, 0.84318, 0.57643, 0.66942, 0.7063]
47+ >>> np.allclose(scalars[0:8],
48+ ... [0.48270401731, 0.39661528543, 0.57813454792, 0.70574099571,
49+ ... 0.84318527207, 0.57642554119, 0.66942016035, 0.70629953593])
50+ True
4951
5052 """
5153 import os
@@ -102,8 +104,8 @@ def travel_depth(command, surface_file, verbose=False):
102104 >>> command = os.path.join(ccode_path, 'travel_depth', 'TravelDepthMain')
103105 >>> depth_file = travel_depth(command, surface_file, verbose)
104106 >>> scalars, name = read_scalars(depth_file)
105- >>> [ np.float("{0:.{1}f}".format(x, 5)) for x in scalars[0:8]]
106- [0.02026, 0.06009, 0.12859, 0.04564, 0.00774, 0.05284, 0.05354, 0.01316]
107+ >>> np.allclose(scalars[0:8], [0.020259869839, 0.06009166489, 0.12858575442, 0.045639221313, 0.007742772964, 0.052839111255, 0.053538904296, 0.013158746337])
108+ True
107109
108110 """
109111 import os
@@ -158,8 +160,8 @@ def geodesic_depth(command, surface_file, verbose=False):
158160 >>> command = os.path.join(ccode_path, 'geodesic_depth', 'GeodesicDepthMain')
159161 >>> depth_file = geodesic_depth(command, surface_file, verbose)
160162 >>> scalars, name = read_scalars(depth_file)
161- >>> [ np.float("{0:.{1}f}".format(x, 5)) for x in scalars[0:8]]
162- [0.02026, 0.06009, 0.12859, 0.04564, 0.00774, 0.05284, 0.05354, 0.01316]
163+ >>> np.allclose(scalars[0:8], [0.020259869839, 0.06009166489, 0.12858575442, 0.045639221313, 0.007742772964, 0.052839111255, 0.053538904296, 0.013158746337])
164+ True
163165
164166 """
165167 import os
@@ -270,8 +272,8 @@ def curvature(command, method, arguments, surface_file, verbose=False):
270272 >>> mean_curvature_file, f1,f2,f3,f4 = curvature(command, method,
271273 ... arguments, surface_file, verbose)
272274 >>> scalars, name = read_scalars(mean_curvature_file)
273- >>> [ np.float("{0:.{1}f}".format(x, 5)) for x in scalars[0:8]]
274- [-5.81361, -5.9313, -6.28055, -5.621, -5.69631, -5.80399, -5.87265, -5.7107]
275+ >>> np.allclose(scalars[0:8], [-5.8136068088, -5.9312990469, -6.2805500474, -5.6210018286, -5.6963067208, -5.8039874097, -5.8726460688, -5.7106966401])
276+ True
275277
276278 """
277279 import os
0 commit comments