(*args)
return True
Check if the parameters are one-to-one correspondence.

    Parameters
    ----------
    args: object
        The parameters to test.

    Returns
    -------
    result: int
        Whether the parameters are one-to-one correspondence.
        1 : yes
        0 : no
        -1: some parameters have the length 1.
Check if the parameters are one-to-one correspondence.
Check if the parameters are one - to - one correspondence .
def check_one_to_one_correspondence(*args):
    """Check if the parameters are one-to-one correspondence.

    Parameters
    ----------
    args: object
        The parameters to test.

    Returns
    -------
    result: int
        Whether the parameters are one-to-one correspondence.
        1 : yes
        0 : no
        -1: some parameters have the length 1.
    """
    first_not_none = True
    result = True
    for item in args:
        # only check not none object
        if item is not None:
            if first_not_none:
                # record item type
                first_not_none = False
                if_array = isinstance(item, (list, np.ndarray, BaseCollection))
                if if_array:
                    itemlen = len(item)
                else:
                    itemlen = 1
            else:
                if isinstance(item, (list, np.ndarray, BaseCollection)):
                    if len(item) != itemlen:
                        return False
                else:
                    if itemlen != 1:
                        return False
    return True
def check_one_to_one_correspondence ( * args ) : first_not_none = True result = True for item in args : # only check not none object if item is not None : if first_not_none : # record item type first_not_none = False if_array = isinstance ( item , ( list , np . ndarray , BaseCollection ) ) if if_array : itemlen = len ( item ) else : itemlen = 1 else : if isinstance ( item , ( list , np . ndarray , BaseCollection ) ) : if len ( item ) != itemlen : return False else : if itemlen != 1 : return False return True