Skip to content
Snippets Groups Projects
Commit 57f26fb7 authored by Joseph Weston's avatar Joseph Weston
Browse files

correct documentation for 'id_by_site' attribute

Closes #295.
parent dd9fd59c
No related branches found
No related tags found
No related merge requests found
Pipeline #17437 passed with warnings
...@@ -1980,7 +1980,9 @@ class FiniteSystem(_FinalizedBuilderMixin, system.FiniteSystem): ...@@ -1980,7 +1980,9 @@ class FiniteSystem(_FinalizedBuilderMixin, system.FiniteSystem):
to the integer-labeled site ``i`` of the low-level system. The sites to the integer-labeled site ``i`` of the low-level system. The sites
are ordered first by their family and then by their tag. are ordered first by their family and then by their tag.
id_by_site : dict 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): def __init__(self, builder):
...@@ -2097,7 +2099,9 @@ class InfiniteSystem(_FinalizedBuilderMixin, system.InfiniteSystem): ...@@ -2097,7 +2099,9 @@ class InfiniteSystem(_FinalizedBuilderMixin, system.InfiniteSystem):
``sites[i]`` is the `~kwant.builder.Site` instance that corresponds ``sites[i]`` is the `~kwant.builder.Site` instance that corresponds
to the integer-labeled site ``i`` of the low-level system. to the integer-labeled site ``i`` of the low-level system.
id_by_site : dict 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 Notes
----- -----
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment