Skip to content

Instantly share code, notes, and snippets.

@Jdsleppy
Jdsleppy / 2DPeakFinding.py
Last active Mar 21, 2016
2D peak finding inspired by binary search
View 2DPeakFinding.py
def create_search_grid(center_point, side_length):
# Return a 3x3 grid of points, centered at center_point,
# making a square side_length tall and wide.
return grid_of_points
def stop_condition(value):
# Decide if you're at a good enough place to end the search.
# Tweak this for your own application.
return should_stop_searching