From 57f26fb730966f15be92d71924e5fa373a4837b6 Mon Sep 17 00:00:00 2001 From: Joseph Weston <joseph@weston.cloud> Date: Thu, 9 May 2019 14:09:42 +0200 Subject: [PATCH] correct documentation for 'id_by_site' attribute Closes #295. --- kwant/builder.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kwant/builder.py b/kwant/builder.py index ad482a75..79e1f019 100644 --- a/kwant/builder.py +++ b/kwant/builder.py @@ -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 ----- -- GitLab