def compute_adjacency_matrix(X, method='auto', **kwargs):
    """Compute an adjacency matrix with the given method"""
    if method == 'auto':
        if X.shape[0] > 10000:
            method = 'cyflann'
        else:
            method = 'kd_tree'
    return Adjacency.init(method, **kwargs).adjacency_graph(X.astype('float'))
def compute_adjacency_matrix ( X , method = 'auto' , ** kwargs ) : if method == 'auto' : if X . shape [ 0 ] > 10000 : method = 'cyflann' else : method = 'kd_tree' return Adjacency . init ( method , ** kwargs ) . adjacency_graph ( X . astype ( 'float' ) )
Compute an adjacency matrix with the given method