Skip to content

Commit a07cb7d

Browse files
committed
Fix: Dependency changes
1 parent b2dbe3d commit a07cb7d

File tree

1 file changed

+8
-24
lines changed

1 file changed

+8
-24
lines changed

tests/metrics/test_measures.py

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -410,27 +410,9 @@ def _downcast_(sparse_graph):
410410
(
411411
MultiDiGraph(wheel_graph(5)),
412412
{
413-
"normal": array([1 / 3, 0.0, 0.0, 0.0, 0.0]),
414-
"length": array([1 / 6, 0.0, 0.0, 0.0, 0.0]),
415-
"linear": array([1 / 6, 0.0, 0.0, 0.0, 0.0]),
416-
"edge_normal": {
417-
(0, 1, 0): 0.1,
418-
(1, 0, 0): 0.1,
419-
(0, 2, 0): 0.1,
420-
(2, 0, 0): 0.1,
421-
(0, 3, 0): 0.1,
422-
(3, 0, 0): 0.1,
423-
(0, 4, 0): 0.1,
424-
(4, 0, 0): 0.1,
425-
(1, 2, 0): 0.05,
426-
(2, 1, 0): 0.05,
427-
(2, 3, 0): 0.05,
428-
(3, 2, 0): 0.05,
429-
(3, 4, 0): 0.05,
430-
(4, 3, 0): 0.05,
431-
(4, 1, 0): 0.05,
432-
(1, 4, 0): 0.05,
433-
},
413+
"normal": array([0.0, 0.0, 0.0, 1 / 6, 1 / 6]),
414+
"length": array([0.0, 0.0, 0.0, 1 / 12, 1 / 12]),
415+
"linear": array([0.0, 0.0, 0.0, 1 / 12, 1 / 12]),
434416
},
435417
),
436418
],
@@ -456,6 +438,8 @@ def test_calculate_betweenness_scales(graph, expected):
456438
)
457439
if "edge_normal" in expected:
458440
edge_bc = get_edge_attributes(graph, "edge_betweenness_normal")
441+
print([expected["edge_normal"][edge] for edge in edge_bc.keys()])
442+
print(list(edge_bc.values()))
459443
assert allclose(
460444
list(edge_bc.values()),
461445
[expected["edge_normal"][edge] for edge in edge_bc.keys()],
@@ -552,9 +536,9 @@ def test_calculate_betweenness_scales(graph, expected):
552536
(
553537
MultiDiGraph(Graph([(0, 1), (0, 2), (0, 3), (1, 2), (1, 3)])),
554538
{
555-
"normal": array([2.0, 0.0, 0.0, 0.0]),
556-
"length": array([1.0, 0.0, 0.0, 0.0]),
557-
"linear": array([1.0, 0.0, 0.0, 0.0]),
539+
"normal": array([0.0, 2.0, 0.0, 0.0]),
540+
"length": array([0.0, 1.0, 0.0, 0.0]),
541+
"linear": array([0.0, 1.0, 0.0, 0.0]),
558542
},
559543
),
560544
],

0 commit comments

Comments
 (0)