Example #1
0
 def test_eucl_distance_02(self):
     u = np.array([[1, 2]])
     v = np.array([[3, 4]])
     expected_output = 8**0.5
     output = CVTSampling.eucl_distance(u, v)
     self.assertEqual(expected_output, output)
Example #2
0
 def test_eucl_distance_04(self):
     u = np.array([[1, 2]])
     v = np.array([[5, 6], [7, 8]])
     expected_output = np.array([32**0.5, 72**0.5])
     output = CVTSampling.eucl_distance(u, v)
     np.testing.assert_array_equal(expected_output, output)
Example #3
0
 def test_eucl_distance_01(self):
     u = np.array([[3]])
     v = np.array([[5]])
     expected_output = 2
     output = CVTSampling.eucl_distance(u, v)
     self.assertEqual(expected_output, output)