def union(regions):
    """
    Returns union of all regions

    :param regions: list of region as an array [xmin, ymin, xmax, ymax]
    :type regions: list of list of four float
    :returns: xmin, ymin, xmax, ymax
    :rtype: list of 4 float
    """

    xmin = min([r[0] for r in regions])
    xmax = max([r[2] for r in regions])
    ymin = min([r[1] for r in regions])
    ymax = max([r[3] for r in regions])

    return xmin, ymin, xmax, ymax