Skip to content

Commit

Permalink
Merge pull request #30 from samuelduchesne/parameter
Browse files Browse the repository at this point in the history
Ensures size of ParameterCollection does not include questions
  • Loading branch information
samuelduchesne committed Feb 11, 2021
2 parents 9be0523 + abc8eec commit a62190f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyTrnsysType/collections/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,8 @@ def _to_deck(self):
)
params_str = tabulate.tabulate(v_, tablefmt="plain", numalign="left")
return head + params_str + "\n"

@property
def size(self):
"""The number of parameters"""
return len([p for p in self if not self[p]._is_question])

0 comments on commit a62190f

Please sign in to comment.