Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- distance = np.sqrt(np.sum((X_train - X_test)**2, axis = 1)) # Vectorization syntax
- print(distance)
- [ 3.60555128 1.80277564 2.8 3.39705755 5.83095189 4.47213595]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement