Created
February 21, 2017 20:09
-
-
Save alep/603b41674dcb0b1fd5d2b752d386840d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#python3 | |
import numpy as np | |
from itertools import product | |
from scipy.spatial.distance import euclidean | |
coords = [(35.0456, -85.2672), | |
(35.1174, -89.9711), | |
(35.9728, -83.9422), | |
(36.1667, -86.7833)] | |
a = np.fromiter(map(lambda x: euclidean(x[0], x[1]), product(coords, repeat=2)), dtype=float) | |
a.resize(4,4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment