@@ -236,33 +236,31 @@ def test_dunder_array(array):
236236def test_to_timestamp_monthly_resolution ():
237237 idx = PeriodIndex (["2011-01" , "NaT" , "2011-02" ], freq = "2M" )
238238 ts = idx .to_timestamp ()
239- assert ts .dtype == np .dtype ("datetime64[M ]" )
239+ assert ts .dtype == np .dtype ("datetime64[ns ]" )
240240
241241
242242def test_to_timestamp_yearly_resolution ():
243243 idx = PeriodIndex (["2011" , "2012" ], freq = "A" )
244244 ts = idx .to_timestamp ()
245- assert ts .dtype == np .dtype ("datetime64[Y ]" )
245+ assert ts .dtype == np .dtype ("datetime64[ns ]" )
246246
247247
248248def test_to_timestamp_large_month_no_out_of_bounds ():
249249 idx = PeriodIndex (["May 3000" ], freq = "M" )
250250 ts = idx .to_timestamp ()
251- assert ts .dtype == np .dtype ("datetime64[M]" )
252- assert str (ts [0 ]) == "3000-05"
251+ assert ts .dtype == np .dtype ("datetime64[ns]" )
253252
254253
255254def test_to_timestamp_large_year_no_out_of_bounds ():
256255 idx = PeriodIndex (["3000" ], freq = "Y" )
257256 ts = idx .to_timestamp ()
258- assert ts .dtype == np .dtype ("datetime64[Y]" )
259- assert str (ts [0 ]) == "3000"
257+ assert ts .dtype == np .dtype ("datetime64[ns]" )
260258
261259
262260def test_to_timestamp_daily_resolution ():
263261 idx = PeriodIndex (["2011-01-01" , "2011-01-02" ], freq = "D" )
264262 ts = idx .to_timestamp ()
265- assert ts .dtype == np .dtype ("datetime64[D ]" )
263+ assert ts .dtype == np .dtype ("datetime64[ns ]" )
266264
267265
268266def test_to_timestamp_nanosecond_resolution ():
0 commit comments