Skip to content

Commit 5fb9c05

Browse files
committed
docs: fix some typos
1 parent a88431f commit 5fb9c05

File tree

9 files changed

+30
-30
lines changed

9 files changed

+30
-30
lines changed

src/_igraph/graphobject.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,8 +1925,8 @@ PyObject *igraphmodule_Graph_radius(igraphmodule_GraphObject * self,
19251925
}
19261926

19271927
/** \ingroup python_interface_graph
1928-
* \brief Converts a tree graph into a Prufer sequence
1929-
* \return the Prufer sequence as a Python object
1928+
* \brief Converts a tree graph into a Prüfer sequence
1929+
* \return the Prüfer sequence as a Python object
19301930
* \sa igraph_to_prufer
19311931
*/
19321932
PyObject *igraphmodule_Graph_to_prufer(igraphmodule_GraphObject *self, PyObject* Py_UNUSED(_null))
@@ -2024,7 +2024,7 @@ PyObject *igraphmodule_Graph_Atlas(PyTypeObject * type, PyObject * args)
20242024
}
20252025

20262026
/** \ingroup python_interface_graph
2027-
* \brief Generates a graph based on the Barabasi-Albert model
2027+
* \brief Generates a graph based on the Barabási-Albert model
20282028
* This is intended to be a class method in Python, so the first argument
20292029
* is the type object and not the Python igraph object (because we have
20302030
* to allocate that in this method).
@@ -3290,7 +3290,7 @@ PyObject *igraphmodule_Graph_Random_Bipartite(PyTypeObject * type,
32903290
}
32913291

32923292
/** \ingroup python_interface_graph
3293-
* \brief Generates a graph based on sort of a "windowed" Barabasi-Albert model
3293+
* \brief Generates a graph based on sort of a "windowed" Barabási-Albert model
32943294
* \return a reference to the newly generated Python igraph object
32953295
* \sa igraph_recent_degree_game
32963296
*/
@@ -13864,8 +13864,8 @@ struct PyMethodDef igraphmodule_Graph_methods[] = {
1386413864
METH_VARARGS | METH_CLASS | METH_KEYWORDS,
1386513865
"Barabasi(n, m, outpref=False, directed=False, power=1,\n"
1386613866
" zero_appeal=1, implementation=\"psumtree\", start_from=None)\n--\n\n"
13867-
"Generates a graph based on the Barabasi-Albert model.\n\n"
13868-
"B{Reference}: Barabasi, A-L and Albert, R. 1999. Emergence of scaling\n"
13867+
"Generates a graph based on the Barabási-Albert model.\n\n"
13868+
"B{Reference}: Barabási, A-L and Albert, R. 1999. Emergence of scaling\n"
1386913869
"in random networks. I{Science}, 286 509-512.\n\n"
1387013870
"@param n: the number of vertices\n"
1387113871
"@param m: either the number of outgoing edges generated for\n"
@@ -14084,7 +14084,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = {
1408414084
METH_VARARGS | METH_CLASS | METH_KEYWORDS,
1408514085
"Preference(n, type_dist, pref_matrix, attribute=None, directed=False, loops=False)\n--\n\n"
1408614086
"Generates a graph based on vertex types and connection probabilities.\n\n"
14087-
"This is practically the nongrowing variant of L{Establishment}.\n"
14087+
"This is practically the non-growing variant of L{Establishment}.\n"
1408814088
"A given number of vertices are generated. Every vertex is assigned to a\n"
1408914089
"vertex type according to the given type probabilities. Finally, every\n"
1409014090
"vertex pair is evaluated and an edge is created between them with a\n"
@@ -14140,7 +14140,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = {
1414014140
{"SBM", (PyCFunction) igraphmodule_Graph_SBM,
1414114141
METH_VARARGS | METH_CLASS | METH_KEYWORDS,
1414214142
"SBM(n, pref_matrix, block_sizes, directed=False, loops=False)\n--\n\n"
14143-
"Generates a graph based on a stochastic blockmodel.\n\n"
14143+
"Generates a graph based on a stochastic block model.\n\n"
1414414144
"A given number of vertices are generated. Every vertex is assigned to a\n"
1414514145
"vertex type according to the given block sizes. Vertices of the same\n"
1414614146
"type will be assigned consecutive vertex IDs. Finally, every\n"
@@ -14494,7 +14494,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = {
1449414494
"of the vertices.\n\n"
1449514495
"This coefficient is basically the correlation between the actual\n"
1449614496
"connectivity patterns of the vertices and the pattern expected from the\n"
14497-
"disribution of the vertex types.\n\n"
14497+
"distribution of the vertex types.\n\n"
1449814498
"See equation (21) in Newman MEJ: Mixing patterns in networks, Phys Rev E\n"
1449914499
"67:026126 (2003) for the proper definition. The actual calculation is\n"
1450014500
"performed using equation (26) in the same paper for directed graphs, and\n"
@@ -14684,7 +14684,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = {
1468414684
"closeness(vertices=None, mode=\"all\", cutoff=None, weights=None, "
1468514685
"normalized=True)\n--\n\n"
1468614686
"Calculates the closeness centralities of given vertices in a graph.\n\n"
14687-
"The closeness centerality of a vertex measures how easily other\n"
14687+
"The closeness centrality of a vertex measures how easily other\n"
1468814688
"vertices can be reached from it (or the other way: how easily it\n"
1468914689
"can be reached from the other vertices). It is defined as the\n"
1469014690
"number of vertices minus one divided by the sum of\n"
@@ -14717,7 +14717,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = {
1471714717
"harmonic_centrality(vertices=None, mode=\"all\", cutoff=None, weights=None, "
1471814718
"normalized=True)\n--\n\n"
1471914719
"Calculates the harmonic centralities of given vertices in a graph.\n\n"
14720-
"The harmonic centerality of a vertex measures how easily other\n"
14720+
"The harmonic centrality of a vertex measures how easily other\n"
1472114721
"vertices can be reached from it (or the other way: how easily it\n"
1472214722
"can be reached from the other vertices). It is defined as the\n"
1472314723
"mean inverse distance to all other vertices.\n\n"
@@ -14744,7 +14744,7 @@ struct PyMethodDef igraphmodule_Graph_methods[] = {
1474414744
METH_VARARGS | METH_KEYWORDS,
1474514745
"connected_components(mode=\"strong\")\n--\n\n"
1474614746
"Calculates the (strong or weak) connected components for a given graph.\n\n"
14747-
"Atttention: this function has a more convenient interface in class\n"
14747+
"Attention: this function has a more convenient interface in class\n"
1474814748
"L{Graph}, which wraps the result in a L{VertexClustering} object.\n"
1474914749
"It is advised to use that.\n"
1475014750
"@param mode: must be either C{\"strong\"} or C{\"weak\"}, depending on\n"

src/igraph/adjacency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def _get_adjlist(self, mode="out"):
128128
contains the neighbors of the given vertex.
129129
130130
@param mode: if C{\"out\"}, returns the successors of the vertex. If
131-
C{\"in\"}, returns the predecessors of the vertex. If C{\"all"\"}, both
131+
C{\"in\"}, returns the predecessors of the vertex. If C{\"all\"}, both
132132
the predecessors and the successors will be returned. Ignored
133133
for undirected graphs.
134134
"""

src/igraph/basic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _add_edges(graph, es, attributes=None):
3434
@param es: the list of edges to be added. Every edge is represented
3535
with a tuple containing the vertex IDs or names of the two
3636
endpoints. Vertices are enumerated from zero.
37-
@param attributes: dict of sequences, all of length equal to the
37+
@param attributes: dict of sequences, each of length equal to the
3838
number of edges to be added, containing the attributes of the new
3939
edges.
4040
"""
@@ -92,7 +92,7 @@ def _add_vertices(graph, n, attributes=None):
9292
vertex to be added, or a sequence of strings, each corresponding to the
9393
name of a vertex to be added. Names will be assigned to the C{name}
9494
vertex attribute.
95-
@param attributes: dict of sequences, all of length equal to the
95+
@param attributes: dict of sequences, each of length equal to the
9696
number of vertices to be added, containing the attributes of the new
9797
vertices. If n is a string (so a single vertex is added), then the
9898
values of this dict are the attributes themselves, but if n=1 then
@@ -136,7 +136,7 @@ def _delete_edges(graph, *args, **kwds):
136136
first positional argument is callable, an edge sequence is derived by
137137
calling L{EdgeSeq.select} with the same positional and keyword
138138
arguments. Edges in the derived edge sequence will be removed.
139-
Otherwise the first positional argument is considered as follows:
139+
Otherwise, the first positional argument is considered as follows:
140140
141141
Deprecation notice: C{delete_edges(None)} has been replaced by
142142
C{delete_edges()} - with no arguments - since igraph 0.8.3.

src/igraph/clustering.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ def __plot__(self, backend, context, *args, **kwds):
452452
453453
- C{True}: all the groups will be highlighted, the colors matching
454454
the corresponding color indices from the current palette
455-
(see the C{palette} keyword argument of L{Graph.__plot__}.
455+
(see the C{palette} keyword argument of L{Graph.__plot__}).
456456
457457
- A dict mapping cluster indices or tuples of vertex indices to
458458
color names. The given clusters or vertex groups will be
@@ -1151,7 +1151,7 @@ def __plot__(self, backend, context, *args, **kwds):
11511151
11521152
- C{True}: all the clusters will be highlighted, the colors matching
11531153
the corresponding color indices from the current palette
1154-
(see the C{palette} keyword argument of L{Graph.__plot__}.
1154+
(see the C{palette} keyword argument of L{Graph.__plot__}).
11551155
11561156
- A dict mapping cluster indices or tuples of vertex indices to
11571157
color names. The given clusters or vertex groups will be
@@ -1371,7 +1371,7 @@ def _handle_mark_groups_arg_for_clustering(mark_groups, clustering):
13711371
to clusters automatically.
13721372
"""
13731373
# Handle the case of mark_groups = True, mark_groups containing a list or
1374-
# tuple of cluster IDs, and and mark_groups yielding (cluster ID, color)
1374+
# tuple of cluster IDs, and mark_groups yielding (cluster ID, color)
13751375
# pairs
13761376
if mark_groups is True:
13771377
group_iter = ((group, color) for color, group in enumerate(clustering))
@@ -1483,7 +1483,7 @@ def compare_communities(comm1, comm2, method="vi", remove_none=False):
14831483
as a L{Clustering} object.
14841484
@param method: the measure to use. C{"vi"} or C{"meila"} means the
14851485
variation of information metric of Meila (2003), C{"nmi"} or C{"danon"}
1486-
means the normalized mutual information as defined by Danon et al (2005),
1486+
means the normalized mutual information as defined by Danon et al. (2005),
14871487
C{"split-join"} means the split-join distance of van Dongen (2000),
14881488
C{"rand"} means the Rand index of Rand (1971), C{"adjusted_rand"}
14891489
means the adjusted Rand index of Hubert and Arabie (1985).

src/igraph/community.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _community_infomap(graph, edge_weights=None, vertex_weights=None, trials=10)
4646
4747
@param edge_weights: name of an edge attribute or a list containing
4848
edge weights.
49-
@param vertex_weights: name of an vertex attribute or a list containing
49+
@param vertex_weights: name of a vertex attribute or a list containing
5050
vertex weights.
5151
@param trials: the number of attempts to partition the network.
5252
@return: an appropriate L{VertexClustering} object with an extra attribute
@@ -111,7 +111,7 @@ def _community_label_propagation(graph, weights=None, initial=None, fixed=None):
111111
112112
Note that since ties are broken randomly, there is no guarantee that
113113
the algorithm returns the same community structure after each run.
114-
In fact, they frequently differ. See the paper of Raghavan et al
114+
In fact, they frequently differ. See the paper of Raghavan et al.
115115
on how to come up with an aggregated community structure.
116116
117117
Also note that the community _labels_ (numbers) have no semantic meaning
@@ -156,10 +156,10 @@ def _community_multilevel(graph, weights=None, return_levels=False, resolution=1
156156
iteratively in a way that maximizes the vertices' local contribution
157157
to the overall modularity score. When a consensus is reached (i.e. no
158158
single move would increase the modularity score), every community in
159-
the original graph is shrank to a single vertex (while keeping the
159+
the original graph is shrunk to a single vertex (while keeping the
160160
total weight of the incident edges) and the process continues on the
161161
next level. The algorithm stops when it is not possible to increase
162-
the modularity any more after shrinking the communities to vertices.
162+
the modularity anymore after shrinking the communities to vertices.
163163
164164
This algorithm is said to run almost in linear time on sparse graphs.
165165

src/igraph/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def setboolean(obj, section, key, value):
125125
@param value: the value itself. C{0}, C{false}, C{no} and C{off}
126126
means false, C{1}, C{true}, C{yes} and C{on} means true,
127127
everything else results in a C{ValueError} being thrown.
128-
Values are case insensitive
128+
Values are case-insensitive
129129
"""
130130
value = str(value).lower()
131131
if value in ("0", "false", "no", "off"):
@@ -234,7 +234,7 @@ def _item_to_section_key(item: str) -> Tuple[str, str]:
234234
"""Converts an item description to a section-key pair.
235235
236236
@param item: the item to be converted
237-
@return: if C{item} contains a period (C{.}), it is splitted into two parts
237+
@return: if C{item} contains a period (C{.}), it is split into two parts
238238
at the first period, then the two parts are returned, so the part before
239239
the period is the section. If C{item} does not contain a period, the
240240
section is assumed to be C{general}, and the second part of the returned

src/igraph/formula.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def construct_graph_from_formula(cls, formula=None, attr="name", simplify=True):
153153
+ edges (vertex names):
154154
A->B
155155
156-
If you have may disconnected componnets, you can separate them
156+
If you have many disconnected componnets, you can separate them
157157
with commas. You can also specify isolated vertices:
158158
159159
>>> g = Graph.Formula("A--B, C--D, E--F, G--H, I, J, K")
@@ -181,7 +181,7 @@ def construct_graph_from_formula(cls, formula=None, attr="name", simplify=True):
181181
@param formula: the formula itself
182182
@param attr: name of the vertex attribute where the vertex names
183183
will be stored
184-
@param simplify: whether the simplify the constructed graph
184+
@param simplify: whether to simplify the constructed graph
185185
@return: the constructed graph:
186186
"""
187187

src/igraph/layout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Layout:
3838
the vertices. It was particularly convenient for me to use the same layout
3939
for all of them, especially when I made figures for a paper. However,
4040
C{igraph} will of course refuse to draw a graph with a layout that has
41-
less coordinates than the node count of the graph.
41+
fewer coordinates than the node count of the graph.
4242
4343
Layouts behave exactly like lists when they are accessed using the item
4444
index operator (C{[...]}). They can even be iterated through. Items

src/igraph/statistics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ def power_law_fit(data, xmin=None, method="auto", p_precision=0.01):
530530
size if n is small.
531531
532532
- C{discrete}: exact maximum likelihood estimation when the
533-
input comes from a discrete scale (see Clauset et al among the
533+
input comes from a discrete scale (see Clauset et al. among the
534534
references).
535535
536536
- C{auto}: exact maximum likelihood estimation where the continuous

0 commit comments

Comments
 (0)