def bounding_box(iterable):
    min_x, min_y = numpy.min(iterable[0], axis=0)
max_x, max_y = numpy.max(iterable[0], axis=0)
return numpy.array([(min_x, min_y), (max_x, min_y), (max_x, max_y), (min_x,
    max_y)])
Calculating bounding box of numpy array