@@ -228,7 +228,7 @@ def _aggregate_impact_mat(imp_pnt, gdf_pnt, agg_met):
228
228
229
229
col_geom = gdf_pnt .index .get_level_values (level = 0 )
230
230
# Converts string multi-index level 0 to integer index
231
- # col_geom = np.sort(np.unique(col_geom, return_inverse=True)[1])
231
+ col_geom = np .sort (np .unique (col_geom , return_inverse = True )[1 ])
232
232
row_pnt = np .arange (len (col_geom ))
233
233
234
234
if agg_met is AggMethod .SUM :
@@ -238,7 +238,7 @@ def _aggregate_impact_mat(imp_pnt, gdf_pnt, agg_met):
238
238
f"The available aggregation methods are { AggMethod ._member_names_ } "
239
239
) # pylint: disable=no-member, protected-access
240
240
csr_mask = sp .sparse .csr_matrix (
241
- (mask , (row_pnt , row_pnt )), shape = (len (row_pnt ), len (row_pnt ))
241
+ (mask , (row_pnt , row_pnt )), shape = (len (row_pnt ), len (np . unique ( row_pnt ) ))
242
242
)
243
243
244
244
return imp_pnt .imp_mat .dot (csr_mask )
@@ -962,7 +962,7 @@ def _line_to_pnts(gdf_lines, res, to_meters):
962
962
LOGGER .warning (
963
963
"%d lines with a length < 10*resolution were found. "
964
964
"Each of these lines is disaggregate to one point. "
965
- "Reaggregating values will thus likely lead to overestimation . "
965
+ "Reaggregatint values will thus likely lead to overestimattion . "
966
966
"Consider chosing a smaller resolution or filter out the short lines. " ,
967
967
failing_res_check_count ,
968
968
)
0 commit comments