Skip to content

Commit e81ee40

Browse files
committed
Correct meth syntax
1 parent 896b327 commit e81ee40

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/python-api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -507,12 +507,12 @@ Descendant nodes
507507
Tree.num_samples
508508
Tree.num_tracked_samples
509509
510-
Note that :meth:Tree.num_samples provides an efficient way to count samples under a node.
510+
Note that :meth:`Tree.num_samples` provides an efficient way to count samples under a node.
511511
However, samples and leaves are not always equivalent: some samples may be internal nodes,
512512
some leaves may not be samples (in unsimplified tree sequences), and the same node can be
513-
a leaf in one tree but internal in another. While `tree.num_samples` often equals the leaf
514-
count (particularly in simplified tree sequences without internal samples), a strict leaf
515-
count requires tree traversal, e.g. via `num_leaves = len(list(tree.leaves()))`.
513+
a leaf in one tree but internal in another. While ``tree.num_samples()`` often equals the
514+
leaf count (particularly in simplified tree sequences without internal samples), a strict
515+
leaf count requires tree traversal, e.g. via ``num_leaves = len(list(tree.leaves()))``.
516516
517517
518518
Multiple nodes

python/tskit/trees.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7103,7 +7103,7 @@ def concatenate(
71037103
):
71047104
r"""
71057105
Concatenate a set of tree sequences to the right of this one, by repeatedly
7106-
calling {meth}`union` with an (optional)
7106+
calling :meth:`~TreeSequence.union` with an (optional)
71077107
node mapping for each of the ``others``. If any node mapping is ``None``
71087108
only map the sample nodes between the input tree sequence and this one,
71097109
based on the numerical order of sample node IDs.
@@ -7117,14 +7117,14 @@ def concatenate(
71177117
:param Union[list, None] node_mappings: An list of node mappings for each
71187118
input tree sequence in ``args``. Each should either be an array of
71197119
integers of the same length as the number of nodes in the equivalent
7120-
input tree sequence (see :meth:`union` for details), or ``None``.
7121-
If ``None``, only sample nodes are mapped to each other.
7120+
input tree sequence (see :meth:`~TreeSequence.union` for details), or
7121+
``None``. If ``None``, only sample nodes are mapped to each other.
71227122
Default: ``None``, treated as ``[None] * len(args)``.
71237123
:param bool record_provenance: If True (default), record details of this
71247124
call to ``concatenate`` in the returned tree sequence's provenance
71257125
information (Default: True).
71267126
:param bool add_populations: If True (default), nodes new to ``self`` will
7127-
be assigned new population IDs (see :meth:`union`)
7127+
be assigned new population IDs (see :meth:`~TreeSequence.union`)
71287128
"""
71297129
if node_mappings is None:
71307130
node_mappings = [None] * len(args)

0 commit comments

Comments
 (0)