Skip to content

Commit f27f1d6

Browse files
committed
add property for coordinates
1 parent de9ae92 commit f27f1d6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

climada/engine/impact.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,16 @@ def plot_eai_exposure(self, ignore_zero=True, pop_name=True,
257257
return plot.geo_bin_from_array(self.eai_exp[pos_vals], \
258258
self.coord_exp[pos_vals], var_name, title, pop_name, buffer_deg, \
259259
extend, **kwargs)
260+
261+
@property
262+
def coord_exp(self):
263+
""" Return coord"""
264+
return self._coord_exp
265+
266+
@coord_exp.setter
267+
def coord_exp(self, value):
268+
""" If it is not a GridPoints instance, put it."""
269+
if not isinstance(value, GridPoints):
270+
self._coord_exp = GridPoints(value)
271+
else:
272+
self._coord_exp = value

0 commit comments

Comments
 (0)