Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions python/tskit/trees.py
Original file line number Diff line number Diff line change
Expand Up @@ -5972,6 +5972,10 @@ def mutations_site(self):
:ref:`sec_mutation_table_definition` as a numpy array (dtype=np.int32).
Equivalent to ``ts.tables.mutations.site`` (but avoiding the full copy
of the table data that accessing ``ts.tables`` currently entails).

.. note::
To efficently get an array of the number of mutations per site, you
can use ``np.bincount(ts.mutations_site, minlength=ts.num_sites)``.
"""
return self._mutations_site

Expand Down
Loading