From 0954871d3516655dbcbbd6ff301cf074ec129f00 Mon Sep 17 00:00:00 2001 From: George Dang <53052793+gtdang@users.noreply.github.com> Date: Mon, 26 Aug 2024 13:46:29 -0400 Subject: [PATCH] docs: doc string for _available_cores method --- hnn_core/gui/gui.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hnn_core/gui/gui.py b/hnn_core/gui/gui.py index 7d395e220..8e89cf8df 100644 --- a/hnn_core/gui/gui.py +++ b/hnn_core/gui/gui.py @@ -433,6 +433,13 @@ def __init__(self, theme_color="#802989", @staticmethod def _available_cores(): + """Return the number of available cores to the process. + + This is important for systems where the number of available cores is + partitioned such as on HPC systems. Linux and Windows can return cpu + affinity, which is the number of available cores. MacOS can only return + total system cores. + """ # For macos if platform.system() == 'Darwin': return psutil.cpu_count()