@@ -726,7 +726,7 @@ def test_groupby_drops_nans(shuffle: bool, chunk: Literal[False] | dict) -> None
726726 [
727727 np .datetime64 ("2001-01-01" ),
728728 np .datetime64 ("2001-01-01" ),
729- np .datetime64 ("NaT" ),
729+ np .datetime64 ("NaT" , "D" ),
730730 ],
731731 )
732732 expected5 = xr .DataArray (3 , [("t" , [np .datetime64 ("2001-01-01" )])])
@@ -2018,7 +2018,7 @@ def test_resample_first_last(self, use_cftime) -> None:
20182018 # missing periods, GH10169
20192019 actual = array .isel (time = [0 , 1 , 2 , 3 , 8 , 9 ]).resample (time = "1D" ).last ()
20202020 expected = DataArray (
2021- np .array ([times [3 ], np .datetime64 ("NaT" ), times [9 ]]),
2021+ np .array ([times [3 ], np .datetime64 ("NaT" , "us" ), times [9 ]]),
20222022 dims = "time" ,
20232023 coords = {"time" : times [::4 ]},
20242024 name = "time" ,
@@ -3836,7 +3836,7 @@ def test_mean_datetime_edge_cases():
38363836 # Test with NaT values
38373837 dates_with_nat = pd .date_range ("2021-01-01" , periods = 4 , freq = "D" )
38383838 dates_with_nat_array = dates_with_nat .values .copy ()
3839- dates_with_nat_array [1 ] = np .datetime64 ("NaT" )
3839+ dates_with_nat_array [1 ] = np .datetime64 ("NaT" , "us" )
38403840
38413841 ds = xr .Dataset (
38423842 {
0 commit comments