Commit 57f26fb7 authored by Joseph Weston's avatar Joseph Weston

correct documentation for 'id_by_site' attribute

Closes #295.
parent dd9fd59c
Pipeline #18140 passed with stages
in 43 minutes and 10 seconds
......@@ -1980,7 +1980,9 @@ class FiniteSystem(_FinalizedBuilderMixin, system.FiniteSystem):
to the integer-labeled site ``i`` of the low-level system. The sites
are ordered first by their family and then by their tag.
id_by_site : dict
The inverse of ``sites``; maps from ``i`` to ``sites[i]``.
The inverse of ``sites``; maps high-level `~kwant.builder.Site`
instances to their integer label.
Satisfies ``id_by_site[sites[i]] == i``.
"""
def __init__(self, builder):
......@@ -2097,7 +2099,9 @@ class InfiniteSystem(_FinalizedBuilderMixin, system.InfiniteSystem):
``sites[i]`` is the `~kwant.builder.Site` instance that corresponds
to the integer-labeled site ``i`` of the low-level system.
id_by_site : dict
The inverse of ``sites``; maps from ``i`` to ``sites[i]``.
The inverse of ``sites``; maps high-level `~kwant.builder.Site`
instances to their integer label.
Satisfies ``id_by_site[sites[i]] == i``.
Notes
-----
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment