Solve Problems by Coding Solutions - A Complete solution for python programming
Using square() and sum()
import numpy as np
point1 = np.array((5,2))
point2 = np.array((1,5))
sum_sq = np.sum(np.square(point1 - point2))
print(np.sqrt(sum_sq))
Post a Comment
No comments:
Post a Comment