def iou(self, other):
inters = self.intersection(other)<EOL>if inters is None:<EOL><INDENT>return <NUM_LIT:0.0><EOL><DEDENT>else:<EOL><INDENT>area_union = self.area + other.area - inters.area<EOL>return inters.area / area_union if area_union > <NUM_LIT:0> else <NUM_LIT:0.0><EOL><DEDENT>
Compute the IoU of this bounding box with another one.

IoU is the intersection over union, defined as::

    ``area(intersection(A, B)) / area(union(A, B))``
    ``= area(intersection(A, B)) / (area(A) + area(B) - area(intersection(A, B)))``

Parameters
----------
other : imgaug.BoundingBox
    Other bounding box with which to compare.

Returns
-------
float
    IoU between the two bounding boxes.