Java methods getting euclidean distance
Your method returns a Point because you return result which is an instance of Point. If you want a double (value) for the distance you should do it this way:
Your method returns a Point because you return result which is an instance of Point. If you want a double (value) for the distance you should do it this way:
Use numpy.linalg.norm: You can find the theory behind this in Introduction to Data Mining This works because the Euclidean distance is the l2 norm, and the default value of the ord parameter in numpy.linalg.norm is 2.