def matrix_check(table):
    """
    Check input matrix format.

    :param table: input matrix
    :type table : dict
    :return: bool
    """
    try:
        if len(table.keys()) == 0:
            return False
        for i in table.keys():
            if table.keys() != table[i].keys() or vector_check(
                    list(table[i].values())) is False:
                return False
        return True
    except Exception:
        return False
def matrix_check ( table ) : try : if len ( table . keys ( ) ) == 0 : return False for i in table . keys ( ) : if table . keys ( ) != table [ i ] . keys ( ) or vector_check ( list ( table [ i ] . values ( ) ) ) is False : return False return True except Exception : return False
Check input matrix format.

    :param table: input matrix
    :type table : dict
    :return: bool