def image_to_object_dist(efl, image_distance):
    """Compute the object distance from the image distance.

    Parameters
    ----------
    efl : `float`
        focal length of the lens
    image_distance : `float` or `numpy.ndarray`
        distance from the object to the front principal plane of the lens,
        positive for an object in front of a lens of positive focal length.

    Notes
    -----
    efl and image distance should be in the same units.  Return value will
    be in the same units as the input.

    """
    ret = 1 / efl - 1 / image_distance
    return 1 / ret