def test_dist_itslef(self):
"""Compary cdist to GeoPy."""
X = [[0, 10], [4, 2]] # Just some points. I've no idea where on globe.
c = cdist(X[0], X[1])
string_geopy = '{}'.format(great_circle(X[0], X[1]))
float_geopy = float(string_geopy[:-3])
self.assertTrue(np.round(c) == np.round(float_geopy))
X = [[34.0522, 118.2437], # Lon Angeles
[37.7749, 122.4194]] # San Francisco
c = cdist(X[0], X[1])
string_geopy = '{}'.format(great_circle(X[0], X[1]))
float_geopy = float(string_geopy[:-3])
self.assertTrue(np.round(c) == np.round(float_geopy))
评论列表
文章目录