Commit 67f7464d authored by Alex Henrie's avatar Alex Henrie

Remove unused imports

parent d2dc156a
......@@ -100,7 +100,6 @@ __URL__ = "http://graph-tool.skewed.de"
import numpy
import numpy.ma
import scipy
import scipy.stats
from .dl_import import *
......@@ -126,8 +125,7 @@ import collections.abc
import itertools
import csv
from .decorators import _require, _attrs, _limit_args, _copy_func
from inspect import ismethod
from .decorators import _require, _limit_args, _copy_func
__all__ = ["Graph", "GraphView", "Vertex", "Edge", "VertexBase", "EdgeBase",
"Vector_bool", "Vector_int16_t", "Vector_int32_t", "Vector_int64_t",
......
......@@ -44,14 +44,13 @@ Contents
from .. dl_import import dl_import
dl_import("from . import libgraph_tool_clustering as _gt")
from .. import _degree, _prop, Graph, GraphView, VertexPropertyMap, _get_rng
from .. import _prop, Graph, GraphView, VertexPropertyMap, _get_rng
from .. topology import isomorphism
from .. generation import random_rewire
from .. stats import vertex_hist
from collections import defaultdict
from numpy import *
from numpy import random
__all__ = ["local_clustering", "global_clustering", "extended_clustering",
"motifs", "motif_significance"]
......
......@@ -19,7 +19,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
import os.path
try:
from os import RTLD_LAZY, RTLD_GLOBAL
......
......@@ -70,9 +70,7 @@ from .. import Graph, GraphView, _check_prop_vector, _check_prop_scalar, \
group_vector_property, ungroup_vector_property, infect_vertex_property, \
_prop, _get_rng
from .. topology import max_cardinality_matching, max_independent_vertex_set, \
label_components, pseudo_diameter, shortest_distance, make_maximal_planar, \
is_planar
from .. stats import label_parallel_edges
label_components, shortest_distance, make_maximal_planar, is_planar
from .. generation import predecessor_tree, condensation_graph
import numpy.random
from numpy import sqrt
......
......@@ -89,7 +89,7 @@ except ImportError:
warnings.warn(msg, RuntimeWarning)
from .. draw import sfdp_layout, random_layout, _avg_edge_distance, \
coarse_graphs, radial_tree_layout, prop_to_size
radial_tree_layout, prop_to_size
from .. generation import graph_union
from .. topology import shortest_path
......
......@@ -21,7 +21,6 @@
import sys
import os
import os.path
import time
import warnings
import ctypes
import ctypes.util
......
......@@ -20,11 +20,10 @@
import numpy
from .. import GraphView, PropertyMap, VertexPropertyMap, \
ungroup_vector_property, group_vector_property, infect_vertex_property, \
edge_endpoint_property, _prop
from .. import GraphView, PropertyMap, ungroup_vector_property, \
group_vector_property, infect_vertex_property, edge_endpoint_property, _prop
from .cairo_draw import *
from .cairo_draw import _vdefaults, _edefaults
from .cairo_draw import _edefaults
from .. draw import sfdp_layout, random_layout, _avg_edge_distance, \
coarse_graphs
......
......@@ -52,8 +52,7 @@ from .. dl_import import dl_import
dl_import("from . import libgraph_tool_generation")
from .. import Graph, GraphView, _check_prop_scalar, _prop, _limit_args, \
_gt_type, _get_rng, libcore, Vector_double
from .. stats import label_parallel_edges, label_self_loops
_gt_type, _get_rng, Vector_double
import inspect
import types
import numpy
......@@ -2372,4 +2371,4 @@ class DynamicSampler(libgraph_tool_generation.DynamicSampler):
libgraph_tool_generation.DynamicSampler.__init__(self, values, probs)
def sample(self):
return libgraph_tool_generation.DynamicSampler.sample(self, _get_rng())
\ No newline at end of file
return libgraph_tool_generation.DynamicSampler.sample(self, _get_rng())
......@@ -19,7 +19,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import pickle
import base64
import atexit
from io import BytesIO
from . import libgraph_tool_core
......
......@@ -18,12 +18,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .. import _degree, _prop, Graph, GraphView, libcore, _get_rng, \
PropertyMap, VertexPropertyMap, Vector_size_t, Vector_double, \
group_vector_property, perfect_prop_hash
from .. import _prop, Graph, libcore, _get_rng, PropertyMap, \
VertexPropertyMap, Vector_size_t, Vector_double, group_vector_property, \
perfect_prop_hash
from .. generation import condensation_graph, random_rewire, generate_sbm, \
solve_sbm_fugacities, generate_maxent_sbm
from .. stats import label_self_loops, remove_parallel_edges, remove_self_loops
from .. stats import remove_parallel_edges, remove_self_loops
from .. spectral import adjacency
import random
from numpy import *
......@@ -2573,4 +2573,4 @@ def microstate_entropy(h, unlabel=True):
return libinference.partitions_entropy(h, unlabel)
from . overlap_blockmodel import *
\ No newline at end of file
from . overlap_blockmodel import *
......@@ -18,16 +18,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .. import _degree, _prop, Graph, GraphView, libcore, _get_rng, PropertyMap, \
Vector_size_t, Vector_double, group_vector_property
from .. generation import condensation_graph
from .. stats import label_self_loops
from .. spectral import adjacency
from .. import _prop, _get_rng, group_vector_property
import random
from numpy import *
import numpy
import copy
import collections
from . blockmodel import *
from . util import *
......@@ -288,4 +281,4 @@ def em_infer(state, max_iter=1000, max_e_iter=1, epsilon=1e-3,
break
if verbose:
print(niter, delta)
return delta, niter
\ No newline at end of file
return delta, niter
......@@ -18,23 +18,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .. import _degree, _prop, Graph, GraphView, libcore, _get_rng, PropertyMap
import random
from .. import _prop, Graph, GraphView, libcore, _get_rng
from numpy import *
import numpy
from collections import defaultdict
from scipy.special import gammaln
import copy
import warnings
from .. import group_vector_property, ungroup_vector_property, Vector_size_t, \
perfect_prop_hash
from .. import group_vector_property, ungroup_vector_property, perfect_prop_hash
from .. dl_import import dl_import
dl_import("from . import libgraph_tool_inference as libinference")
from .. generation import graph_union
from .. stats import vertex_hist
from . blockmodel import *
from . blockmodel import _bm_test
......@@ -1115,4 +1110,4 @@ def init_layer_confined(g, ec):
ba.fa = ba.fa + ec.fa * (ba.fa.max() + 1)
continuous_map(ba)
be = group_vector_property([ba, ba])
return be
\ No newline at end of file
return be
......@@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .. import _degree, _prop, Graph, GraphView
from .. import _prop, Graph, GraphView
from . blockmodel import *
from . blockmodel import _bm_test
from . overlap_blockmodel import *
......
......@@ -18,12 +18,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .. import _degree, _prop, Graph, GraphView, libcore, _get_rng, PropertyMap
from .. import _prop, Graph, libcore, _get_rng, PropertyMap
import random
from numpy import *
import numpy
from collections import defaultdict
from .. import group_vector_property, ungroup_vector_property
......
......@@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .. import _degree, _prop, Graph, GraphView, _get_rng, Vector_size_t
from .. import Graph, _get_rng, Vector_size_t
from . blockmodel import DictState, get_entropy_args, _bm_test
from .. dl_import import dl_import
......
......@@ -18,8 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .. import _degree, _prop, Graph, GraphView, _get_rng, Vector_int32_t, \
Vector_size_t
from .. import Graph, _get_rng, Vector_int32_t, Vector_size_t
from . blockmodel import DictState, get_entropy_args, _bm_test
from .. dl_import import dl_import
......@@ -370,4 +369,4 @@ def overlap_center(bs, init=None):
nr = np.bincount(bs[:,i])
c[i] = nr.argmax()
delta = 1 - partition_overlap(c, lc)
return c
\ No newline at end of file
return c
......@@ -18,8 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .. import _degree, _prop, Graph, GraphView, libcore, _get_rng, \
PropertyMap, edge_endpoint_property
from .. import _prop, Graph, GraphView, _get_rng, PropertyMap, \
edge_endpoint_property
from .. dl_import import dl_import
dl_import("from . import libgraph_tool_inference as libinference")
......
......@@ -81,7 +81,6 @@ from .. dl_import import dl_import
dl_import("from . import libgraph_tool_search")
from .. import _prop, _python_type, _get_null_vertex
import weakref
import numpy
__all__ = ["bfs_search", "bfs_iterator", "BFSVisitor", "dfs_search",
......
......@@ -49,7 +49,6 @@ dl_import("from . import libgraph_tool_stats")
from .. import _degree, _prop, _get_rng, GraphView, PropertyMap
from numpy import *
import numpy
__all__ = ["vertex_hist", "edge_hist", "vertex_average", "edge_average",
"label_parallel_edges", "remove_parallel_edges",
......
......@@ -76,10 +76,9 @@ dl_import("from . import libgraph_tool_topology")
from .. import _prop, Vector_int32_t, Vector_size_t, _check_prop_writable, \
_check_prop_scalar, _check_prop_vector, Graph, VertexPropertyMap, \
EdgePropertyMap, PropertyMap, GraphView, libcore, _get_rng, _degree, \
perfect_prop_hash, _limit_args
PropertyMap, GraphView, libcore, _get_rng, perfect_prop_hash, _limit_args
from .. stats import label_self_loops
import random, numpy, collections
import numpy, collections
__all__ = ["isomorphism", "subgraph_isomorphism", "mark_subgraph",
"max_cliques", "max_cardinality_matching",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment