Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions climada/util/lines_polys_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ def _aggregate_impact_mat(imp_pnt, gdf_pnt, agg_met):
row_pnt = np.arange(len(col_geom))

if agg_met is AggMethod.SUM:
mask = np.ones(len(col_geom))
mask = np.ones(len(row_pnt))
else:
raise NotImplementedError(
f"The available aggregation methods are {AggMethod._member_names_}"
) # pylint: disable=no-member, protected-access
csr_mask = sp.sparse.csr_matrix(
(mask, (row_pnt, col_geom)), shape=(len(row_pnt), len(np.unique(col_geom)))
(mask, (row_pnt, row_pnt)), shape=(len(row_pnt), len(np.unique(row_pnt)))
)

return imp_pnt.imp_mat.dot(csr_mask)
Expand Down
Loading