@@ -850,7 +850,7 @@ def test_operators_timedelta64(self):
850850 assert rs .dtype == "timedelta64[ns]"
851851
852852 df = DataFrame ({"A" : v1 })
853- td = Series ([timedelta (days = i ) for i in range (3 )])
853+ td = Series ([timedelta (days = i ) for i in range (3 )], dtype = "m8[ns]" )
854854 assert td .dtype == "timedelta64[ns]"
855855
856856 # series on the rhs
@@ -875,7 +875,9 @@ def test_operators_timedelta64(self):
875875
876876 # datetimes on rhs
877877 result = df ["A" ] - datetime (2001 , 1 , 1 )
878- expected = Series ([timedelta (days = 4017 + i ) for i in range (3 )], name = "A" )
878+ expected = Series (
879+ [timedelta (days = 4017 + i ) for i in range (3 )], name = "A" , dtype = "m8[ns]"
880+ )
879881 tm .assert_series_equal (result , expected )
880882 assert result .dtype == "m8[ns]"
881883
@@ -1559,7 +1561,7 @@ def test_tdi_rmul_arraylike(self, other, box_with_array):
15591561
15601562 def test_td64arr_mul_bool_scalar_raises (self , box_with_array ):
15611563 # GH#58054
1562- ser = Series (np .arange (5 ) * timedelta (hours = 1 ))
1564+ ser = Series (np .arange (5 ) * timedelta (hours = 1 ), dtype = "m8[ns]" )
15631565 obj = tm .box_expected (ser , box_with_array )
15641566
15651567 msg = r"Cannot multiply 'timedelta64\[ns\]' by bool"
@@ -1582,7 +1584,7 @@ def test_td64arr_mul_bool_scalar_raises(self, box_with_array):
15821584 )
15831585 def test_td64arr_mul_bool_raises (self , dtype , box_with_array ):
15841586 # GH#58054
1585- ser = Series (np .arange (5 ) * timedelta (hours = 1 ))
1587+ ser = Series (np .arange (5 ) * timedelta (hours = 1 ), dtype = "m8[ns]" )
15861588 obj = tm .box_expected (ser , box_with_array )
15871589
15881590 other = Series (np .arange (5 ) < 0.5 , dtype = dtype )
@@ -1611,7 +1613,7 @@ def test_td64arr_mul_bool_raises(self, dtype, box_with_array):
16111613 ],
16121614 )
16131615 def test_td64arr_mul_masked (self , dtype , box_with_array ):
1614- ser = Series (np .arange (5 ) * timedelta (hours = 1 ))
1616+ ser = Series (np .arange (5 ) * timedelta (hours = 1 ), dtype = "m8[ns]" )
16151617 obj = tm .box_expected (ser , box_with_array )
16161618
16171619 other = Series (np .arange (5 ), dtype = dtype )
0 commit comments