diff --git a/src/gurobi_optimods/min_cut.py b/src/gurobi_optimods/min_cut.py index 640aae4f..b1a3e7a7 100644 --- a/src/gurobi_optimods/min_cut.py +++ b/src/gurobi_optimods/min_cut.py @@ -205,10 +205,11 @@ def _min_cut_scipy(G, source, sink, create_env): return MinCutResult(0.0, (set(), set()), set()) queue = [source] + G = G.tocsr() while len(queue) > 0: node = queue.pop() p1.add(node) - row = G.getrow(node) + row = G[[node]] # Add successors of `node` that are not in the cutset queue.extend( [