/external/fonttools/Tests/misc/ |
D | py23_test.py | 90 self.assertAlmostEqual(round2(0.125, 2), 0.13) 91 self.assertAlmostEqual(round2(0.375, 2), 0.38) 92 self.assertAlmostEqual(round2(0.625, 2), 0.63) 93 self.assertAlmostEqual(round2(0.875, 2), 0.88) 94 self.assertAlmostEqual(round2(-0.125, 2), -0.13) 95 self.assertAlmostEqual(round2(-0.375, 2), -0.38) 96 self.assertAlmostEqual(round2(-0.625, 2), -0.63) 97 self.assertAlmostEqual(round2(-0.875, 2), -0.88) 99 self.assertAlmostEqual(round2(0.25, 1), 0.3) 100 self.assertAlmostEqual(round2(0.75, 1), 0.8) [all …]
|
D | fixedTools_test.py | 23 self.assertAlmostEqual(-9.98, fixedToFloat(-639, 6)) 24 self.assertAlmostEqual(-10.0, fixedToFloat(-640, 6)) 25 self.assertAlmostEqual(9.98, fixedToFloat(639, 6)) 26 self.assertAlmostEqual(10.0, fixedToFloat(640, 6))
|
/external/python/cpython2/Lib/test/ |
D | test_complex.py | 20 def assertAlmostEqual(self, a, b): member in ComplexTest 23 unittest.TestCase.assertAlmostEqual(self, a.real, b.real) 24 unittest.TestCase.assertAlmostEqual(self, a.imag, b.imag) 26 unittest.TestCase.assertAlmostEqual(self, a.real, b) 27 unittest.TestCase.assertAlmostEqual(self, a.imag, 0.) 30 unittest.TestCase.assertAlmostEqual(self, a, b.real) 31 unittest.TestCase.assertAlmostEqual(self, 0., b.imag) 33 unittest.TestCase.assertAlmostEqual(self, a, b) 115 self.assertAlmostEqual(complex.__truediv__(2+0j, 1+1j), 1-1j) 124 self.assertAlmostEqual(complex.__floordiv__(3+0j, 1.5+0j), 2) [all …]
|
D | test_turtle.py | 127 self.assertAlmostEqual( 205 self.assertAlmostEqual(answer, expected) 254 self.assertAlmostEqual(self.nav.xcor(), 100) 255 self.assertAlmostEqual(self.nav.ycor(), -100) 274 self.assertAlmostEqual(self.nav.xcor(), 100) 275 self.assertAlmostEqual(self.nav.ycor(), -100) 277 self.assertAlmostEqual(self.nav.xcor(), 0) 278 self.assertAlmostEqual(self.nav.ycor(), 0) 307 self.assertAlmostEqual(self.nav.distance(Vec2D(0,0)), expected) 311 self.assertAlmostEqual(self.nav.heading(), 90) [all …]
|
D | test_cmath.py | 117 self.assertAlmostEqual(cmath.pi, pi_expected, places=9, 119 self.assertAlmostEqual(cmath.e, e_expected, places=9, 398 self.assertAlmostEqual(phase(0), 0.) 399 self.assertAlmostEqual(phase(1.), 0.) 400 self.assertAlmostEqual(phase(-1.), pi) 401 self.assertAlmostEqual(phase(-1.+1E-300j), pi) 402 self.assertAlmostEqual(phase(-1.-1E-300j), -pi) 403 self.assertAlmostEqual(phase(1j), pi/2) 404 self.assertAlmostEqual(phase(-1j), -pi/2) 413 self.assertAlmostEqual(phase(complex(-INF, -0.0)), -pi) [all …]
|
/external/python/cpython3/Lib/test/ |
D | test_complex.py | 16 def assertAlmostEqual(self, a, b): member in ComplexTest 19 unittest.TestCase.assertAlmostEqual(self, a.real, b.real) 20 unittest.TestCase.assertAlmostEqual(self, a.imag, b.imag) 22 unittest.TestCase.assertAlmostEqual(self, a.real, b) 23 unittest.TestCase.assertAlmostEqual(self, a.imag, 0.) 26 unittest.TestCase.assertAlmostEqual(self, a, b.real) 27 unittest.TestCase.assertAlmostEqual(self, 0., b.imag) 29 unittest.TestCase.assertAlmostEqual(self, a, b) 106 self.assertAlmostEqual(complex.__truediv__(2+0j, 1+1j), 1-1j) 172 self.assertAlmostEqual(pow(1+1j, 0+0j), 1.0) [all …]
|
D | test_turtle.py | 127 self.assertAlmostEqual( 208 self.assertAlmostEqual(answer, expected) 258 self.assertAlmostEqual(self.nav.xcor(), 100) 259 self.assertAlmostEqual(self.nav.ycor(), -100) 278 self.assertAlmostEqual(self.nav.xcor(), 100) 279 self.assertAlmostEqual(self.nav.ycor(), -100) 281 self.assertAlmostEqual(self.nav.xcor(), 0) 282 self.assertAlmostEqual(self.nav.ycor(), 0) 311 self.assertAlmostEqual(self.nav.distance(Vec2D(0,0)), expected) 315 self.assertAlmostEqual(self.nav.heading(), 90) [all …]
|
D | test_cmath.py | 154 self.assertAlmostEqual(cmath.pi, pi_expected, places=9, 156 self.assertAlmostEqual(cmath.e, e_expected, places=9, 466 self.assertAlmostEqual(phase(0), 0.) 467 self.assertAlmostEqual(phase(1.), 0.) 468 self.assertAlmostEqual(phase(-1.), pi) 469 self.assertAlmostEqual(phase(-1.+1E-300j), pi) 470 self.assertAlmostEqual(phase(-1.-1E-300j), -pi) 471 self.assertAlmostEqual(phase(1j), pi/2) 472 self.assertAlmostEqual(phase(-1j), -pi/2) 481 self.assertAlmostEqual(phase(complex(-INF, -0.0)), -pi) [all …]
|
/external/tensorflow/tensorflow/contrib/losses/python/losses/ |
D | loss_ops_test.py | 54 self.assertAlmostEqual(0.0, loss.eval(), 3) 59 self.assertAlmostEqual(5.5, loss.eval(), 3) 66 self.assertAlmostEqual(5.5 * weights, loss.eval(), 3) 73 self.assertAlmostEqual(5.5 * weights, loss.eval(), 3) 80 self.assertAlmostEqual(5.6, loss.eval(), 3) 87 self.assertAlmostEqual(5.6, loss.eval(), 3) 94 self.assertAlmostEqual(16.6, loss.eval(), 3) 101 self.assertAlmostEqual(6.0, loss.eval(), 3) 108 self.assertAlmostEqual(0.0, loss.eval(), 3) 134 self.assertAlmostEqual(loss.eval(), 0.0, 3) [all …]
|
/external/tensorflow/tensorflow/python/keras/ |
D | losses_test.py | 216 self.assertAlmostEqual(self.evaluate(loss), 0.0, 3) 225 self.assertAlmostEqual(self.evaluate(loss), 49.5, 3) 234 self.assertAlmostEqual(self.evaluate(loss), 113.85, 3) 244 self.assertAlmostEqual(self.evaluate(loss), 767.8 / 6, 3) 254 self.assertAlmostEqual(self.evaluate(loss), 587 / 6, 3) 263 self.assertAlmostEqual(self.evaluate(loss), 0.0, 3) 293 self.assertAlmostEqual(self.evaluate(loss), 227.69998, 3) 309 self.assertAlmostEqual(self.evaluate(loss), 0.0, 3) 318 self.assertAlmostEqual(self.evaluate(loss), 5.5, 3) 327 self.assertAlmostEqual(self.evaluate(loss), 12.65, 3) [all …]
|
D | metrics_confusion_matrix_test.py | 365 self.assertAlmostEqual(0.5, self.evaluate(result)) 374 self.assertAlmostEqual(0, self.evaluate(result)) 388 self.assertAlmostEqual(expected_precision, self.evaluate(result)) 448 self.assertAlmostEqual(1. / 3, self.evaluate(result)) 468 self.assertAlmostEqual(expected_precision, self.evaluate(result)) 477 self.assertAlmostEqual(1, self.evaluate(result)) 478 self.assertAlmostEqual(1, self.evaluate(p_obj.true_positives)) 479 self.assertAlmostEqual(0, self.evaluate(p_obj.false_positives)) 484 self.assertAlmostEqual(1, self.evaluate(result)) 485 self.assertAlmostEqual(1, self.evaluate(p_obj.true_positives)) [all …]
|
/external/tensorflow/tensorflow/contrib/layers/python/layers/ |
D | target_column_test.py | 37 self.assertAlmostEqual( 47 self.assertAlmostEqual( 51 self.assertAlmostEqual( 66 self.assertAlmostEqual( 80 self.assertAlmostEqual( 96 self.assertAlmostEqual(1.0 / 3, sess.run(accuracy_op)) 105 self.assertAlmostEqual(1.5514446, 117 self.assertAlmostEqual( 140 self.assertAlmostEqual(1.5514446, sess.run(loss_op)) 152 self.assertAlmostEqual(0.25, sess.run(loss)) [all …]
|
/external/python/cpython2/Lib/unittest/test/ |
D | test_assertions.py | 8 self.assertAlmostEqual(1.00000001, 1.0) 11 self.assertAlmostEqual, 1.0000001, 1.0) 15 self.assertAlmostEqual(1.1, 1.0, places=0) 17 self.assertAlmostEqual, 1.1, 1.0, places=1) 19 self.assertAlmostEqual(0, .1+.1j, places=0) 22 self.assertAlmostEqual, 0, .1+.1j, places=1) 26 self.assertAlmostEqual(float('inf'), float('inf')) 31 self.assertAlmostEqual(1.1, 1.0, delta=0.5) 32 self.assertAlmostEqual(1.0, 1.1, delta=0.5) 36 self.assertAlmostEqual(1.0, 1.0, delta=0.5) [all …]
|
/external/tensorflow/tensorflow/contrib/quantize/python/ |
D | quant_ops_test.py | 63 self.assertAlmostEqual(min_value, -0.5, delta=1e-3) 64 self.assertAlmostEqual(max_value, 0.5, delta=1e-3) 69 self.assertAlmostEqual(min_value, -0.5, delta=1e-3) 70 self.assertAlmostEqual(max_value, 0.5, delta=1e-3) 75 self.assertAlmostEqual(min_value, -0.5, delta=1e-3) 76 self.assertAlmostEqual(max_value, 0.5 * _SYMMETRIC_RANGE_RATIO, delta=1e-3) 77 self.assertAlmostEqual(max_value, min_value * -_SYMMETRIC_RANGE_RATIO) 84 self.assertAlmostEqual(min_value, -0.5, delta=1e-3) 85 self.assertAlmostEqual(max_value, 0.5, delta=1e-3) 86 self.assertAlmostEqual(max_value, -min_value)
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | losses_test.py | 58 self.assertAlmostEqual(0.0, self.evaluate(loss), 3) 63 self.assertAlmostEqual(5.5, self.evaluate(loss), 3) 69 self.assertAlmostEqual(5.5 * weights, self.evaluate(loss), 3) 76 self.assertAlmostEqual(5.5 * weights, self.evaluate(loss), 3) 82 self.assertAlmostEqual(5.6, self.evaluate(loss), 3) 88 self.assertAlmostEqual(5.6, self.evaluate(loss), 3) 94 self.assertAlmostEqual(16.6, self.evaluate(loss), 3) 100 self.assertAlmostEqual(6.0, self.evaluate(loss), 3) 106 self.assertAlmostEqual(0.0, self.evaluate(loss), 3) 135 self.assertAlmostEqual(loss.eval(), 0.0, 3) [all …]
|
D | metrics_test.py | 214 self.assertAlmostEqual(1.65, self.evaluate(mean), 5) 231 self.assertAlmostEqual(0.5, self.evaluate(update_op), 5) 232 self.assertAlmostEqual(1.475, self.evaluate(update_op), 5) 233 self.assertAlmostEqual(12.4 / 6.0, self.evaluate(update_op), 5) 234 self.assertAlmostEqual(1.65, self.evaluate(update_op), 5) 236 self.assertAlmostEqual(1.65, self.evaluate(mean), 5) 267 self.assertAlmostEqual(expected, update_op.eval()) 268 self.assertAlmostEqual(expected, mean.eval()) 278 self.assertAlmostEqual(expected, update_op.eval(), places=5) 279 self.assertAlmostEqual(expected, mean.eval(), places=5) [all …]
|
/external/python/cpython3/Lib/unittest/test/ |
D | test_assertions.py | 10 self.assertAlmostEqual(1.00000001, 1.0) 13 self.assertAlmostEqual, 1.0000001, 1.0) 17 self.assertAlmostEqual(1.1, 1.0, places=0) 19 self.assertAlmostEqual, 1.1, 1.0, places=1) 21 self.assertAlmostEqual(0, .1+.1j, places=0) 24 self.assertAlmostEqual, 0, .1+.1j, places=1) 28 self.assertAlmostEqual(float('inf'), float('inf')) 33 self.assertAlmostEqual(1.1, 1.0, delta=0.5) 34 self.assertAlmostEqual(1.0, 1.1, delta=0.5) 38 self.assertAlmostEqual(1.0, 1.0, delta=0.5) [all …]
|
/external/tensorflow/tensorflow/contrib/kernel_methods/python/ |
D | losses_test.py | 109 self.assertAlmostEqual(loss.eval(), 0.0, 3) 118 self.assertAlmostEqual(loss.eval(), 0.0, 3) 139 self.assertAlmostEqual(result, 0.0, 3) 149 self.assertAlmostEqual(loss.eval(), 0.4333, 3) 161 self.assertAlmostEqual(loss.eval(), 1.2, 3) 173 self.assertAlmostEqual(loss.eval(), 1.1, 3) 184 self.assertAlmostEqual(loss.eval(), 0.0, 3) 194 self.assertAlmostEqual(loss.eval(), 11.0, 3) 204 self.assertAlmostEqual(loss.eval(), 5.5, 3) 215 self.assertAlmostEqual(loss.eval(), 1.05, 3) [all …]
|
/external/tensorflow/tensorflow/contrib/learn/python/learn/estimators/ |
D | svm_test.py | 53 self.assertAlmostEqual(loss, 0.0, places=3) 54 self.assertAlmostEqual(accuracy, 1.0, places=3) 82 self.assertAlmostEqual(accuracy, 1.0, places=3) 109 self.assertAlmostEqual(accuracy, 1.0, places=3) 137 self.assertAlmostEqual(accuracy, 1.0, places=3) 164 self.assertAlmostEqual(loss, 1.0, places=3) 165 self.assertAlmostEqual(accuracy, 1 / 3, places=3) 192 self.assertAlmostEqual(accuracy, 1.0, places=3) 216 self.assertAlmostEqual(accuracy, 1.0, places=3) 255 self.assertAlmostEqual(accuracy, 1.0, places=3)
|
/external/tensorflow/tensorflow/contrib/gan/python/losses/python/ |
D | losses_impl_test.py | 55 self.assertAlmostEqual(self._expected_g_loss, loss.eval(), 5) 63 self.assertAlmostEqual(self._expected_d_loss, loss.eval(), 5) 94 self.assertAlmostEqual(self._expected_g_loss, loss.eval(), 5) 102 self.assertAlmostEqual(self._expected_d_loss, loss.eval(), 5) 116 self.assertAlmostEqual(self._expected_g_loss, loss, 5) 134 self.assertAlmostEqual(self._expected_d_loss, loss, 5) 140 self.assertAlmostEqual(self._expected_g_loss * self._weights, 148 self.assertAlmostEqual(self._expected_d_loss * self._weights, 155 self.assertAlmostEqual(self._expected_g_loss * self._weights, 164 self.assertAlmostEqual(self._expected_d_loss * self._weights, [all …]
|
/external/tensorflow/tensorflow/contrib/metrics/python/ops/ |
D | metric_ops_test.py | 195 self.assertAlmostEqual(1.65, sess.run(mean), 5) 211 self.assertAlmostEqual(0.5, sess.run(update_op), 5) 212 self.assertAlmostEqual(1.475, sess.run(update_op), 5) 213 self.assertAlmostEqual(12.4 / 6.0, sess.run(update_op), 5) 214 self.assertAlmostEqual(1.65, sess.run(update_op), 5) 216 self.assertAlmostEqual(1.65, sess.run(mean), 5) 243 self.assertAlmostEqual((0 + 1 - 3.2 + 4.0) / 4.0, mean.eval(), 5) 265 self.assertAlmostEqual((0 + 1 - 3.2 + 4.0) / 4.0, mean.eval(), 5) 292 self.assertAlmostEqual((0 + 1 - 4.2 + 0) / 4.0, mean.eval(), 5) 314 self.assertAlmostEqual((0 + 1 - 4.2 + 0) / 4.0, mean.eval(), 5) [all …]
|
/external/tensorflow/tensorflow/python/layers/ |
D | normalization_test.py | 337 self.assertAlmostEqual(np.mean(normed_np_output), 0., places=1) 338 self.assertAlmostEqual(np.std(normed_np_output), 1., places=1) 355 self.assertAlmostEqual(np.mean(normed_np_output), 0., places=1) 356 self.assertAlmostEqual(np.std(normed_np_output), 1., places=1) 378 self.assertAlmostEqual(np.mean(normed_np_output), 0., places=1) 379 self.assertAlmostEqual(np.std(normed_np_output), 1., places=1) 396 self.assertAlmostEqual(np.mean(normed_np_output), 0., places=1) 397 self.assertAlmostEqual(np.std(normed_np_output), 1., places=1) 420 self.assertAlmostEqual(np.mean(normed_np_output), 0., places=1) 421 self.assertAlmostEqual(np.std(normed_np_output), 1., places=1) [all …]
|
/external/autotest/client/bin/ |
D | utils_unittest.py | 100 self.assertAlmostEqual(usage, 0.25) 128 self.assertAlmostEqual(usage, 0) 135 self.assertAlmostEqual(utils.get_mem_total(), 2000) 142 self.assertAlmostEqual(utils.get_mem_free(), 300) 149 self.assertAlmostEqual(utils.get_mem_free_plus_buffers_and_cached(),
|
/external/tensorflow/tensorflow/contrib/boosted_trees/estimator_batch/ |
D | custom_export_strategy_test.py | 356 self.assertAlmostEqual(50.0, feature_importances["feature_b"], places=4) 357 self.assertAlmostEqual(50.0, feature_importances["feature_a_0"], places=4) 358 self.assertAlmostEqual(50.0, feature_importances["feature_d"], places=4) 359 self.assertAlmostEqual(
|
/external/tensorflow/tensorflow/contrib/opt/python/training/ |
D | sign_decay_test.py | 72 self.assertAlmostEqual(tf_decayed, py_decayed, places=4) 84 self.assertAlmostEqual(tf_decayed, py_decayed, places=4) 89 self.assertAlmostEqual(tf_decayed, py_decayed, places=4) 101 self.assertAlmostEqual(tf_decayed, py_decayed, places=4) 106 self.assertAlmostEqual(tf_decayed, py_decayed, places=4)
|