From dad4616997fe4cf810666732a957e53be31b6a28 Mon Sep 17 00:00:00 2001 From: Johannes Kochems Date: Fri, 6 Oct 2023 14:35:03 +0200 Subject: [PATCH] Stick to numpydoc code style --- src/oemof/solph/_energy_system.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/oemof/solph/_energy_system.py b/src/oemof/solph/_energy_system.py index cd633ad23..3d40fafe0 100644 --- a/src/oemof/solph/_energy_system.py +++ b/src/oemof/solph/_energy_system.py @@ -213,8 +213,19 @@ def _extract_periods_matrix(self): periods_matrix.append(row) self.periods_matrix = np.array(periods_matrix) - def get_period_duration(self, period: int): - """Get duration of a period in full years""" + def get_period_duration(self, period): + """Get duration of a period in full years + + Parameters + ---------- + period : int + Period for which the duration in years shall be obtained + + Returns + ------- + int + Duration of the period + """ return ( self.periods[period].max().year - self.periods[period].min().year