Skip to content

Commit

Permalink
fixed error in testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinGebhart committed Feb 14, 2025
1 parent 5c219b1 commit 2ee82ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion climada/engine/impact.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def local_exceedance_impact(
test_frequency = 1 / np.array(return_periods)

exceedance_impact = np.full(
(self.imp_mat.shape[1], test_frequency.shape[0]),
(self.imp_mat.shape[1], len(test_frequency)),
np.nan if method == "interpolate" else 0.0,
)

Expand Down
4 changes: 2 additions & 2 deletions climada/hazard/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def local_exceedance_intensity(
test_frequency = 1 / np.array(return_periods)

exceedance_intensity = np.full(
(self.intensity.shape[1], test_frequency.shape[0]),
(self.intensity.shape[1], len(test_frequency)),
np.nan if method == "interpolate" else 0.0,
)

Expand Down Expand Up @@ -687,7 +687,7 @@ def local_return_period(
raise ValueError(f"Unknown method: {method}")

return_periods = np.full(
(self.intensity.shape[1], threshold_intensities.shape[0]), np.nan
(self.intensity.shape[1], len(threshold_intensities)), np.nan
)

nonzero_centroids = np.where(self.intensity.getnnz(axis=0) > 0)[0]
Expand Down

0 comments on commit 2ee82ff

Please sign in to comment.