Skip to content

Commit 008c8cb

Browse files
dependency: numpy 1.24 does not import warnings anymore
1 parent 57086eb commit 008c8cb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

climada/hazard/tc_tracks_synth.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import array
2323
import itertools
2424
import logging
25+
import warnings
2526
import matplotlib.cm as cm_mp
2627
from matplotlib.lines import Line2D
2728
import matplotlib.pyplot as plt
@@ -752,7 +753,7 @@ def _decay_calc_coeff(x_val, v_lf, p_lf):
752753
v_rel : dict
753754
p_rel : dict
754755
"""
755-
np.warnings.filterwarnings('ignore')
756+
warnings.filterwarnings('ignore')
756757
v_rel = dict()
757758
p_rel = dict()
758759
for ss_scale, val_lf in v_lf.items():
@@ -930,7 +931,7 @@ def _apply_decay_coeffs(track, v_rel, p_rel, land_geom, s_rel):
930931
track.max_sustained_wind[land_sea:end_cor] += - r_diff
931932

932933
# correct limits
933-
np.warnings.filterwarnings('ignore')
934+
warnings.filterwarnings('ignore')
934935
cor_p = track.central_pressure.values > track.environmental_pressure.values
935936
track.central_pressure[cor_p] = track.environmental_pressure[cor_p]
936937
track.max_sustained_wind[track.max_sustained_wind < 0] = 0

0 commit comments

Comments
 (0)