Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- x = [1,2]
- y = [5,0]
- def euclidean(a, b):
- diff = np.array(a) - np.array(b)
- square = diff ** 2
- summation = sum(square)
- print(summation)
- return np.sqrt(summation)
- print(euclidean(x,y))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement