diff --git a/CHANGELOG.md b/CHANGELOG.md index efe871001f..a50687cb23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ Code freeze date: YYYY-MM-DD ### Fixed +- Fixed asset count in impact logging message [#1195](https://github.com/CLIMADA-project/climada_python/pull/1195). + ### Deprecated ### Removed diff --git a/climada/engine/impact_calc.py b/climada/engine/impact_calc.py index 0586166173..0f35bc904b 100644 --- a/climada/engine/impact_calc.py +++ b/climada/engine/impact_calc.py @@ -186,7 +186,7 @@ def impact( return self._return_empty(save_mat) LOGGER.info( "Calculating impact for %s assets (>0) and %s events.", - exp_gdf.size, + len(exp_gdf), self.n_events, ) imp_mat_gen = self.imp_mat_gen(exp_gdf, impf_col) diff --git a/climada/engine/test/test_impact_calc.py b/climada/engine/test/test_impact_calc.py index bd606c6e19..9e7b2e2cb2 100644 --- a/climada/engine/test/test_impact_calc.py +++ b/climada/engine/test/test_impact_calc.py @@ -441,7 +441,7 @@ def test_calc_insured_impact_no_insurance(self): self.assertEqual( logs.output, [ - "INFO:climada.engine.impact_calc:Calculating impact for 150 assets (>0) and 14450 events." + "INFO:climada.engine.impact_calc:Calculating impact for 50 assets (>0) and 14450 events." ], ) self.assertEqual(icalc.n_events, len(impact.at_event))