Skip to content

Commit

Permalink
Fix mutable default values in ImpactFreqCurve
Browse files Browse the repository at this point in the history
  • Loading branch information
peanutfun committed Aug 17, 2023
1 parent e1e52a2 commit 36f2ed4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions climada/engine/impact.py
Original file line number Diff line number Diff line change
Expand Up @@ -1854,10 +1854,10 @@ class ImpactFreqCurve():
"""dictionary of tags of exposures, impact functions set and
hazard: {'exp': Tag(), 'impf_set': Tag(), 'haz': Tag()}"""

return_per : np.array = np.array([])
return_per : np.ndarray = field(default_factory=lambda: np.empty(0))
"""return period"""

impact : np.array = np.array([])
impact : np.ndarray = field(default_factory=lambda: np.empty(0))
"""impact exceeding frequency"""

unit : str = ''
Expand Down

0 comments on commit 36f2ed4

Please sign in to comment.