Skip to content

Commit

Permalink
use pd.NA for nullable bool series
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-springer committed Dec 18, 2024
1 parent 6f9aee1 commit a4de214
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rdtools/test/analysis_chains_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def test_filter_ad_hoc_warnings(workflow, sensor_parameters):

# warning about NaNs
ad_hoc_filter = pd.Series(True, index=sensor_parameters["pv"].index)
ad_hoc_filter.iloc[10] = None # np.nan
ad_hoc_filter.iloc[10] = pd.NA
rd_analysis.filter_params["ad_hoc_filter"] = ad_hoc_filter
with pytest.warns(
UserWarning, match="ad_hoc_filter contains NaN values; setting to False"
Expand Down Expand Up @@ -455,7 +455,7 @@ def test_aggregated_filter_ad_hoc_warnings(workflow, sensor_parameters):
rd_analysis_2.filter_params = {"clearsky_filter": {"model": "csi"}}
daily_ad_hoc_filter = pd.Series(True, index=sensor_parameters["pv"].index)
daily_ad_hoc_filter = daily_ad_hoc_filter.resample("1D").first().dropna(how="all")
daily_ad_hoc_filter.iloc[10] = np.nan
daily_ad_hoc_filter.iloc[10] = pd.NA
rd_analysis_2.filter_params_aggregated["ad_hoc_filter"] = daily_ad_hoc_filter
with pytest.warns(
UserWarning, match="ad_hoc_filter contains NaN values; setting to False"
Expand Down

0 comments on commit a4de214

Please sign in to comment.