def compareConfigs(name, c1, c2, shortcut=True, rtol=1E-8, atol=1E-8, output=None):
    """
    Helper function for Config.compare; used to compare two Configs for
    equality.

    If the Configs contain RegistryFields or ConfigChoiceFields, unselected
    Configs will not be compared.

    Floating point comparisons are performed by :func:`numpy.allclose`; refer to
    that for details.

    Parameters
    ----------
    name :
        Name to use when reporting differences
    c1 :
        LHS config to compare
    c2 :
        RHS config to compare
    shortcut :
        If True, return as soon as an inequality is found.
    rtol :
        Relative tolerance for floating point comparisons.
    atol :
        Absolute tolerance for floating point comparisons.
    output :
        If not None, a callable that takes a string, used (possibly repeatedly)
        to report inequalities.
    """
    assert name is not None

    if c1 is None:

        if c2 is None:
            return True

        else:

            if output is not None:
                output("LHS is None for %s" % name)

            return False

    else:

        if c2 is None:

            if output is not None:
                output("RHS is None for %s" % name)

            return False

    if type(c1) != type(c1):

        if output is not None:
            output("Config types do not match for %s: %s != %s" % (
                name, type(c1), type(c2)))

        return False

    equal = True

    for field in c1._fields.values():

        result = field._compare(
            c1, c2, shortcut=shortcut, rtol=rtol, atol=atol, output=output)

        if not result and shortcut:
            return False

        equal = equal and result

    return equal