diff --git a/climada/util/lines_polys_handler.py b/climada/util/lines_polys_handler.py index 38d913d17..b56d44db4 100755 --- a/climada/util/lines_polys_handler.py +++ b/climada/util/lines_polys_handler.py @@ -228,7 +228,7 @@ def _aggregate_impact_mat(imp_pnt, gdf_pnt, agg_met): col_geom = gdf_pnt.index.get_level_values(level=0) # Converts string multi-index level 0 to integer index - col_geom = np.sort(np.unique(col_geom, return_inverse=True)[1]) + # col_geom = np.sort(np.unique(col_geom, return_inverse=True)[1]) row_pnt = np.arange(len(col_geom)) if agg_met is AggMethod.SUM: @@ -238,7 +238,7 @@ def _aggregate_impact_mat(imp_pnt, gdf_pnt, agg_met): f"The available aggregation methods are {AggMethod._member_names_}" ) # pylint: disable=no-member, protected-access csr_mask = sp.sparse.csr_matrix( - (mask, (row_pnt, row_pnt)), shape=(len(row_pnt), len(np.unique(row_pnt))) + (mask, (row_pnt, row_pnt)), shape=(len(row_pnt), len(row_pnt)) ) return imp_pnt.imp_mat.dot(csr_mask)