def number_of_nodes(cmatrix): """ Returns the number of nodes in a graph, assuming the given connection matrix is square. Parameters ---------- cmatrix : connection/adjacency matrix """ m = bct.to_gslm(cmatrix.tolist()) n = bct.number_of_nodes(m) bct.gsl_free(m) return n
def number_of_nodes(cmatrix): """ Returns the number of nodes in a graph, assuming the given connection matrix is square. Parameters ---------- cmatrix : connection/adjacency matrix """ m = bct.to_gslm(cmatrix.tolist()) n = bct.number_of_nodes(m) bct.gsl_free(m) return n
def number_of_nodes(*args): return _bct.number_of_nodes(*args)
def number_of_nodes(*args): return _bct.number_of_nodes(*args)
def number_of_nodes(*args): """number_of_nodes(gsl_matrix m) -> int""" return _bct.number_of_nodes(*args)
def number_of_nodes(*args): """number_of_nodes(gsl_matrix m) -> int""" return _bct.number_of_nodes(*args)