Find the nearest point of a given set of points (part 2)
Mostly this looks good.


  
  assign_box is used to build the bounding box or envelope
  


I benchmarked the speed of assign_box. Please see https://github.com/jhanley634/testing-tools/blob/master/problem/bench/min_of_copied_list.py#L104..L109 . It turns out one can compute a pair of min's / max's slightly faster:

0.017s  scan_manually_with_if
0.019s  scan_with_two_copies
0.030s  assign_box
0.049s  scan_with_key
0.078s  scan_manually_with_min_max


The first two scan approaches are faster than your code.


  
  find_min
  


A comment of # try 8 neighbors first would be more natural than 9, since distance won't be less when row &amp; column offsets are zero.


  
  bruce_force
  


Maybe this is a Bruce Lee joke. I recommend renaming it def brute_force.


  
  distance is a utility method ...
  


I recommend renaming it def distance_squared, as it clearly does not compute Euclidean distance. It's only used in comparisons, and N^2 is monotonic w.r.t. N, so there's no harm done. But you should say what you mean, and mean what you say.