rm CondaPkg environment
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -75,8 +75,8 @@ def not_implemented_for(*graph_types):
|
||||
)
|
||||
|
||||
# 3-way logic: True if "directed" input, False if "undirected" input, else None
|
||||
dval = ("directed" in graph_types) or not ("undirected" in graph_types) and None
|
||||
mval = ("multigraph" in graph_types) or not ("graph" in graph_types) and None
|
||||
dval = ("directed" in graph_types) or "undirected" not in graph_types and None
|
||||
mval = ("multigraph" in graph_types) or "graph" not in graph_types and None
|
||||
errmsg = f"not implemented for {' '.join(graph_types)} type"
|
||||
|
||||
def _not_implemented_for(g):
|
||||
@@ -97,7 +97,7 @@ fopeners = {
|
||||
".gzip": gzip.open,
|
||||
".bz2": bz2.BZ2File,
|
||||
}
|
||||
_dispatch_dict = defaultdict(lambda: open, **fopeners) # type: ignore
|
||||
_dispatch_dict = defaultdict(lambda: open, **fopeners)
|
||||
|
||||
|
||||
def open_file(path_arg, mode="r"):
|
||||
|
||||
@@ -154,12 +154,12 @@ class MappedQueue:
|
||||
def __init__(self, data=None):
|
||||
"""Priority queue class with updatable priorities."""
|
||||
if data is None:
|
||||
self.heap = list()
|
||||
self.heap = []
|
||||
elif isinstance(data, dict):
|
||||
self.heap = [_HeapElement(v, k) for k, v in data.items()]
|
||||
else:
|
||||
self.heap = list(data)
|
||||
self.position = dict()
|
||||
self.position = {}
|
||||
self._heapify()
|
||||
|
||||
def _heapify(self):
|
||||
|
||||
@@ -135,7 +135,7 @@ def connected_cuthill_mckee_ordering(G, heuristic=None):
|
||||
while queue:
|
||||
parent = queue.popleft()
|
||||
yield parent
|
||||
nd = sorted(list(G.degree(set(G[parent]) - visited)), key=itemgetter(1))
|
||||
nd = sorted(G.degree(set(G[parent]) - visited), key=itemgetter(1))
|
||||
children = [n for n, d in nd]
|
||||
visited.update(children)
|
||||
queue.extend(children)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -217,9 +217,7 @@ class TestRandomState:
|
||||
|
||||
@py_random_state(1)
|
||||
def instantiate_py_random_state(self, random_state):
|
||||
assert isinstance(random_state, random.Random) or isinstance(
|
||||
random_state, PythonRandomInterface
|
||||
)
|
||||
assert isinstance(random_state, (random.Random, PythonRandomInterface))
|
||||
return random_state.random()
|
||||
|
||||
def test_random_state_None(self):
|
||||
|
||||
@@ -83,7 +83,7 @@ class UnionFind:
|
||||
|
||||
"""
|
||||
# Ensure fully pruned paths
|
||||
for x in self.parents.keys():
|
||||
for x in self.parents:
|
||||
_ = self[x] # Evaluated for side-effect only
|
||||
|
||||
yield from groups(self.parents).values()
|
||||
|
||||
Reference in New Issue
Block a user