Skip to content

Commit 3f000d2

Browse files
author
JMGilbert
committed
add menu functionality
1 parent 75e2134 commit 3f000d2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

dscim/menu/main_recipe.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ def calculate_discount_factors(self, cons_pc):
11761176
rhos = xr.DataArray(self.rho, coords=[cons_pc.year])
11771177
else:
11781178
# plug the unique rho in an array, and compute e^rho - 1
1179-
rhos = xr.ufuncs.expm1(xr.DataArray(self.rho, coords=[cons_pc.year]))
1179+
rhos = np.expm1(xr.DataArray(self.rho, coords=[cons_pc.year]))
11801180

11811181
stream_rhos = np.divide(
11821182
1, np.multiply.accumulate((rhos.values + 1), rhos.dims.index("year"))
@@ -1311,8 +1311,8 @@ def stream_discount_factors(self):
13111311
discounting_type=self.discounting_type,
13121312
fair_aggregation=self.fair_aggregation,
13131313
)
1314-
1315-
@cachedproperty
1314+
1315+
@cachedproperty
13161316
@save("uncollapsed_discount_factors")
13171317
def uncollapsed_discount_factors(self):
13181318
pop = self.collapsed_pop.sum("region")
@@ -1346,7 +1346,6 @@ def uncollapsed_marginal_damages(self):
13461346

13471347
return md
13481348

1349-
13501349
def ce(self, obj, dims):
13511350
"""Rechunk data appropriately and apply the certainty equivalence
13521351
calculation. This is done in a loop to avoid memory crashes.

0 commit comments

Comments
 (0)