def array_offsets_xy(test_geo, offsets):
    """Return centroid x/y for an array and offsets

    Parameters
    ----------
    test_geo (): Geotransform from which the x/y are to be calculated
    offsets (): number of cells to offset in the x, y direction. Input
        as a list or tuple

    Returns
    -------
    x: x coordinate of centroid
    y: y coordinate of centroid

    """
    xi, yi = offsets
    x = test_geo[0] + (xi + 0.5) * test_geo[1]
    y = test_geo[3] + (yi + 0.5) * test_geo[5]
    return x, y
