# Path: Echobase/Common/errors.py
# def check_dims(arr, nd):
# def check_type(obj, typ):
# def check_function(obj):
# def check_path(path):
# def make_path(path):
# def check_path_overwrite(path):
# def check_has_key(dictionary, key_ref):
# 
# Path: Echobase/Network/Transforms/configuration.py
# CONN_STR = ' <> '
# def label_nodes_to_symm_conns(node_labels):
# def label_symm_conns_to_nodes(conn_labels):
# def find_symm_conn(node_pair_labels, conn_labels):
# def convert_conn_vec_to_adj_matr(conn_vec):
# def convert_adj_matr_to_cfg_matr(adj_matr):


import numpy as np
from ...Common import errors
from ..Transforms import configuration

        dist: ndarray, shape (N, N)
            Undirected, symmetric distance matrix with N nodes

        mean_ord: int
            Polynomial fit order for preserving mean

        std_ord: int
            Polynommial fit order for preserving standard deviation

        perm_seq: ndarray, shape (N*(N-1)/2)
            Randomized indices corresponding to edge weights of `adj'

    Returns
    -------
        adj_wgt: ndarray, shape (N, N)
            Undirected, symmetric surrogate adjacency matrix with N nodes
            The edge distribution is preserved, but not strengths

        adj_detrend: ndarray, shape (N, N)
            Undirected, symmetric adjacency matrix with N nodes
            The topology is preserved but the contribution of geometry
            to the edge weights is removed
    """

    # Standard param checks
    errors.check_type(adj, np.ndarray)
    errors.check_dims(adj, 2)
    if not (adj == adj.T).all():
        raise Exception('Adjacency matrix is not undirected and symmetric.')

# Path: Echobase/Common/errors.py
# def check_dims(arr, nd):
# def check_type(obj, typ):
# def check_function(obj):
# def check_path(path):
# def make_path(path):
# def check_path_overwrite(path):
# def check_has_key(dictionary, key_ref):
# 
# Path: Echobase/Network/Transforms/configuration.py
# CONN_STR = ' <> '
# def label_nodes_to_symm_conns(node_labels):
# def label_symm_conns_to_nodes(conn_labels):
# def find_symm_conn(node_pair_labels, conn_labels):
# def convert_conn_vec_to_adj_matr(conn_vec):
# def convert_adj_matr_to_cfg_matr(adj_matr):


# Path: Echobase/Network/Rewire/geometry.py
import numpy as np
from ...Common import errors
from ..Transforms import configuration


        dist: ndarray, shape (N, N)
            Undirected, symmetric distance matrix with N nodes

        mean_ord: int
            Polynomial fit order for preserving mean

        std_ord: int
            Polynommial fit order for preserving standard deviation

        perm_seq: ndarray, shape (N*(N-1)/2)
            Randomized indices corresponding to edge weights of `adj'

    Returns
    -------
        adj_wgt: ndarray, shape (N, N)
            Undirected, symmetric surrogate adjacency matrix with N nodes
            The edge distribution is preserved, but not strengths

        adj_detrend: ndarray, shape (N, N)
            Undirected, symmetric adjacency matrix with N nodes
            The topology is preserved but the contribution of geometry
            to the edge weights is removed
    """

    # Standard param checks
    errors.check_type(adj, np.ndarray)
    errors.check_dims(adj, 2)
    if not (adj == adj.T).all():
        raise Exception('Adjacency matrix is not undirected and symmetric.')

    errors.check_type(dist, np.ndarray)