@@ -1716,13 +1716,13 @@ def igraph_graph(self, vertex_list=None, vertex_attrs={}, edge_attrs={}):
1716
1716
sage: G.igraph_graph(vertex_list=[]) # optional - python_igraph
1717
1717
Traceback (most recent call last):
1718
1718
...
1719
- ValueError: `` vertex_list`` must be a permutation of the vertices
1719
+ ValueError: parameter vertex_list must be a permutation of the vertices
1720
1720
"""
1721
1721
if vertex_list is None:
1722
1722
vertex_list = self
1723
1723
elif (len(vertex_list) != self.order() or
1724
1724
set(vertex_list) != set(self)):
1725
- raise ValueError("`` vertex_list`` must be a permutation of the vertices")
1725
+ raise ValueError("parameter vertex_list must be a permutation of the vertices")
1726
1726
1727
1727
v_to_int = {v: i for i, v in enumerate(vertex_list)}
1728
1728
edges = [(v_to_int[v], v_to_int[w]) for v, w in self.edge_iterator(labels=False)]
@@ -2031,11 +2031,11 @@ def adjacency_matrix(self, sparse=None, vertices=None, *, base_ring=None, **kwds
2031
2031
sage: graphs.PathGraph(5).adjacency_matrix(vertices=[0,0,0,0,0]) # needs sage.modules
2032
2032
Traceback (most recent call last):
2033
2033
...
2034
- ValueError: `` vertices`` must be a permutation of the vertices
2034
+ ValueError: parameter vertices must be a permutation of the vertices
2035
2035
sage: graphs.PathGraph(5).adjacency_matrix(vertices=[1,2,3]) # needs sage.modules
2036
2036
Traceback (most recent call last):
2037
2037
...
2038
- ValueError: `` vertices`` must be a permutation of the vertices
2038
+ ValueError: parameter vertices must be a permutation of the vertices
2039
2039
sage: Graph ([[0, 42, 'John'], [(42, 'John')]]).adjacency_matrix()
2040
2040
Traceback (most recent call last):
2041
2041
...
@@ -2060,7 +2060,7 @@ def adjacency_matrix(self, sparse=None, vertices=None, *, base_ring=None, **kwds
2060
2060
"``vertices``")
2061
2061
elif (len(vertices) != n or
2062
2062
set(vertices) != set(self.vertex_iterator())):
2063
- raise ValueError("`` vertices`` must be a permutation of the vertices")
2063
+ raise ValueError("parameter vertices must be a permutation of the vertices")
2064
2064
2065
2065
new_indices = {v: i for i, v in enumerate(vertices)}
2066
2066
D = {}
@@ -2258,11 +2258,11 @@ def incidence_matrix(self, oriented=None, sparse=True, vertices=None, edges=None
2258
2258
sage: P5.incidence_matrix(vertices=[1] * P5.order()) # needs sage.modules
2259
2259
Traceback (most recent call last):
2260
2260
...
2261
- ValueError: `` vertices`` must be a permutation of the vertices
2261
+ ValueError: parameter vertices must be a permutation of the vertices
2262
2262
sage: P5.incidence_matrix(edges=[(0, 1)] * P5.size()) # needs sage.modules
2263
2263
Traceback (most recent call last):
2264
2264
...
2265
- ValueError: `` edges`` must be a permutation of the edges
2265
+ ValueError: parameter edges must be a permutation of the edges
2266
2266
sage: P5.incidence_matrix(edges=P5.edges(sort=False, labels=True)) # needs sage.modules
2267
2267
[1 0 0 0]
2268
2268
[1 1 0 0]
@@ -2277,13 +2277,13 @@ def incidence_matrix(self, oriented=None, sparse=True, vertices=None, edges=None
2277
2277
vertices = self.vertices(sort=False)
2278
2278
elif (len(vertices) != self.num_verts() or
2279
2279
set(vertices) != set(self.vertex_iterator())):
2280
- raise ValueError("`` vertices`` must be a permutation of the vertices")
2280
+ raise ValueError("parameter vertices must be a permutation of the vertices")
2281
2281
2282
2282
verts = {v: i for i, v in enumerate(vertices)}
2283
2283
if edges is None:
2284
2284
edges = self.edge_iterator(labels=False)
2285
2285
elif len(edges) != self.size():
2286
- raise ValueError("`` edges`` must be a permutation of the edges")
2286
+ raise ValueError("parameter edges must be a permutation of the edges")
2287
2287
else:
2288
2288
# We check that we have the same set of unlabeled edges
2289
2289
if oriented:
@@ -2295,7 +2295,7 @@ def reorder(u, v):
2295
2295
i_edges = [reorder(verts[e[0]], verts[e[1]]) for e in edges]
2296
2296
s_edges = [reorder(verts[u], verts[v]) for u, v in self.edge_iterator(labels=False)]
2297
2297
if sorted(i_edges) != sorted(s_edges):
2298
- raise ValueError("`` edges`` must be a permutation of the edges")
2298
+ raise ValueError("parameter edges must be a permutation of the edges")
2299
2299
2300
2300
from sage.matrix.constructor import matrix
2301
2301
if base_ring is None:
@@ -2425,7 +2425,7 @@ def distance_matrix(self, vertices=None, *, base_ring=None, **kwds):
2425
2425
vertices = self.vertices(sort=True)
2426
2426
elif (len(vertices) != self.order() or
2427
2427
set(vertices) != set(self.vertex_iterator())):
2428
- raise ValueError("`` vertices`` must be a permutation of the vertices")
2428
+ raise ValueError("parameter vertices must be a permutation of the vertices")
2429
2429
2430
2430
# We extract from **kwds the arguments for distance_all_pairs
2431
2431
keys = ['by_weight', 'algorithm', 'weight_function', 'check_weight']
@@ -2559,7 +2559,7 @@ def weighted_adjacency_matrix(self, sparse=True, vertices=None,
2559
2559
vertices = self.vertices(sort=True)
2560
2560
elif (len(vertices) != self.num_verts() or
2561
2561
set(vertices) != set(self.vertex_iterator())):
2562
- raise ValueError("`` vertices`` must be a permutation of the vertices")
2562
+ raise ValueError("parameter vertices must be a permutation of the vertices")
2563
2563
2564
2564
# Method for checking edge weights and setting default weight
2565
2565
if default_weight is None:
@@ -24501,7 +24501,7 @@ def katz_matrix(self, alpha, nonedgesonly=False, vertices=None):
24501
24501
vertices = self.vertices(sort=True)
24502
24502
elif (len(vertices) != n or
24503
24503
set(vertices) != set(self)):
24504
- raise ValueError("`` vertices`` must be a permutation of the vertices")
24504
+ raise ValueError("parameter vertices must be a permutation of the vertices")
24505
24505
24506
24506
A = self.adjacency_matrix(vertices=vertices)
24507
24507
0 commit comments