Skip to content

Commit 65c1c20

Browse files
committed
Merge branch 'add_sel_to_haz_and_imp_forecast' of https://github.com/CLIMADA-project/climada_python into add_sel_to_haz_and_imp_forecast
2 parents 64aec3d + 49437b2 commit 65c1c20

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

climada/util/test/test_forecast.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ def test_idx_member():
6868
idx = forecast.idx_member(None)
6969
npt.assert_array_equal(idx, np.array([False, False, False, False]), strict=True)
7070

71+
# Try once with inconsitent types
72+
forecast = Forecast(member=np.array(["1", -2, np.nan]))
73+
npt.assert_array_equal(
74+
forecast.idx_member([np.nan, "1"]), np.array([True, False, True]), strict=True
75+
)
76+
7177

7278
def test_idx_lead_time():
7379
"""Test idx_lead_time method of Forecast class."""

0 commit comments

Comments
 (0)