canvas = numpy.zeros((12, 12), dtype=int)
points = [(1, 1), (1, 10), (10, 10), (10, 1)]
start_pt, end_pt = min(points), max(points)
canvas[start_pt[1]:end_pt[1] + 1, start_pt[0]:end_pt[0] + 1] = 1
Рисование полигонов в массивах numpy