Skip to content

Commit d592e08

Browse files
committed
some care in distances_all_pairs.pyx
1 parent e355a11 commit d592e08

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/sage/graphs/distances_all_pairs.pyx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,7 @@ def is_distance_regular(G, parameters=False):
629629
bi[diameter] = None
630630
ci[0] = None
631631
return bi, ci
632-
else:
633-
return True
632+
return True
634633

635634

636635
###################################
@@ -1882,8 +1881,7 @@ def diameter(G, algorithm=None, source=None):
18821881
if LB < 0 or LB > n:
18831882
from sage.rings.infinity import Infinity
18841883
return +Infinity
1885-
else:
1886-
return int(LB)
1884+
return int(LB)
18871885

18881886

18891887
###########
@@ -2722,8 +2720,7 @@ def floyd_warshall(gg, paths=True, distances=False):
27222720
if not gverts:
27232721
if distances and paths:
27242722
return {}, {}
2725-
else:
2726-
return {}
2723+
return {}
27272724

27282725
cdef unsigned int n = max(gverts) + 1
27292726

0 commit comments

Comments
 (0)