From 199db3082979fca8bbceb35803e1e0938e6e852e Mon Sep 17 00:00:00 2001 From: "Ajmera, Mahita SI/HZR-IDSA" Date: Thu, 17 Oct 2024 10:51:54 +0200 Subject: [PATCH] editing doctest --- graphs/graphs_floyd_warshall.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/graphs/graphs_floyd_warshall.py b/graphs/graphs_floyd_warshall.py index 77c69d7b1..926d37c59 100644 --- a/graphs/graphs_floyd_warshall.py +++ b/graphs/graphs_floyd_warshall.py @@ -39,17 +39,13 @@ def floyd_warshall(graph, v): ... [float('inf'), float('inf'), float('inf')], ... [float('inf'), float('inf'), float('inf')] ... ] - >>> for i in range(num_vertices): - ... graph[i][i] = 0.0 - >>> graph[0][1] = 2 - >>> graph[1][0] = 1 + >>> expected = [ ... [0, 2, float('inf')], ... [1, 0, float('inf')], ... [float('inf'), float('inf'), 0] ... ] >>> dist, _ = floyd_warshall(graph, num_vertices) - The shortest path matrix using Floyd Warshall algorithm 0 2 INF