Reputation: 673
I have this code:
def find_smallest_circle_sqtime(list):
inv_number_of_elements = 1.0 / len(list);
smallest_circle = MyCircle(inv_number_of_elements * sum(p.get_x() for p in list),
inv_number_of_elements * sum(p.get_y() for p in list), .1);
smallest_circle.radius = max(smallest_circle.centre.sub(p).norm() for p in list);
return smallest_circle
Where I'm getting the radius of the farthest point in list
relative to the smallest_circle.centre
. But actually I need to get the point itself. How can I do that in the most pythonic way?
Upvotes: 0
Views: 65