def test_distance_array(self):
     """
     (SourceComparison) distance to array
     """
     s1 = Source([[10, 10], [10, 20]], values=[1.0, 2.0])
     assert (s1.distance([20, 25]) == sqrt(200))
     assert (s1.distance(array([20, 25])) == sqrt(200))
Beispiel #2
0
 def test_distance_array(self):
     """
     (SourceComparison) distance to array
     """
     s1 = Source([[10, 10], [10, 20]], values=[1.0, 2.0])
     assert(s1.distance([20, 25]) == sqrt(200))
     assert(s1.distance(array([20, 25])) == sqrt(200))
Beispiel #3
0
 def test_distance_source(self):
     """
     (SourceComparison) distance to source
     """
     s1 = Source([[10, 10], [10, 20]], values=[1.0, 2.0])
     s2 = Source([[20, 20], [20, 30]], values=[1.0, 2.0])
     assert(s1.distance(s2) == sqrt(200))
 def test_distance_source(self):
     """
     (SourceComparison) distance to source
     """
     s1 = Source([[10, 10], [10, 20]], values=[1.0, 2.0])
     s2 = Source([[20, 20], [20, 30]], values=[1.0, 2.0])
     assert (s1.distance(s2) == sqrt(200))