Skip to content

Commit

Permalink
Stick to numpydoc code style
Browse files Browse the repository at this point in the history
  • Loading branch information
jokochems committed Oct 6, 2023
1 parent bbe4d04 commit dad4616
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/oemof/solph/_energy_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dad4616

Please sign in to comment.