2626 timedelta_range ,
2727)
2828import pandas ._testing as tm
29+ from pandas .core .api import (
30+ Float64Index ,
31+ Int64Index ,
32+ UInt64Index ,
33+ )
2934from pandas .tests .arithmetic .common import (
3035 assert_invalid_addsub_type ,
3136 assert_invalid_comparison ,
@@ -489,10 +494,10 @@ def test_addition_ops(self):
489494 # random indexes
490495 msg = "Addition/subtraction of integers and integer-arrays"
491496 with pytest .raises (TypeError , match = msg ):
492- tdi + pd . Int64Index ([1 , 2 , 3 ])
497+ tdi + Int64Index ([1 , 2 , 3 ])
493498
494499 # this is a union!
495- # pytest.raises(TypeError, lambda : pd. Int64Index([1,2,3]) + tdi)
500+ # pytest.raises(TypeError, lambda : Int64Index([1,2,3]) + tdi)
496501
497502 result = tdi + dti # name will be reset
498503 expected = DatetimeIndex (["20130102" , NaT , "20130105" ])
@@ -1570,9 +1575,9 @@ def test_tdi_mul_float_series(self, box_with_array):
15701575 "other" ,
15711576 [
15721577 np .arange (1 , 11 ),
1573- pd . Int64Index (range (1 , 11 )),
1574- pd . UInt64Index (range (1 , 11 )),
1575- pd . Float64Index (range (1 , 11 )),
1578+ Int64Index (range (1 , 11 )),
1579+ UInt64Index (range (1 , 11 )),
1580+ Float64Index (range (1 , 11 )),
15761581 pd .RangeIndex (1 , 11 ),
15771582 ],
15781583 ids = lambda x : type (x ).__name__ ,
@@ -1642,7 +1647,7 @@ def test_td64arr_div_tdlike_scalar(self, two_hours, box_with_array):
16421647 xbox = np .ndarray if box is pd .array else box
16431648
16441649 rng = timedelta_range ("1 days" , "10 days" , name = "foo" )
1645- expected = pd . Float64Index ((np .arange (10 ) + 1 ) * 12 , name = "foo" )
1650+ expected = Float64Index ((np .arange (10 ) + 1 ) * 12 , name = "foo" )
16461651
16471652 rng = tm .box_expected (rng , box )
16481653 expected = tm .box_expected (expected , xbox )
@@ -1685,7 +1690,7 @@ def test_td64arr_div_tdlike_scalar_with_nat(self, two_hours, box_with_array):
16851690 xbox = np .ndarray if box is pd .array else box
16861691
16871692 rng = TimedeltaIndex (["1 days" , NaT , "2 days" ], name = "foo" )
1688- expected = pd . Float64Index ([12 , np .nan , 24 ], name = "foo" )
1693+ expected = Float64Index ([12 , np .nan , 24 ], name = "foo" )
16891694
16901695 rng = tm .box_expected (rng , box )
16911696 expected = tm .box_expected (expected , xbox )
@@ -1703,7 +1708,7 @@ def test_td64arr_div_td64_ndarray(self, box_with_array):
17031708 xbox = np .ndarray if box is pd .array else box
17041709
17051710 rng = TimedeltaIndex (["1 days" , NaT , "2 days" ])
1706- expected = pd . Float64Index ([12 , np .nan , 24 ])
1711+ expected = Float64Index ([12 , np .nan , 24 ])
17071712
17081713 rng = tm .box_expected (rng , box )
17091714 expected = tm .box_expected (expected , xbox )
@@ -1846,7 +1851,7 @@ def test_td64arr_floordiv_tdlike_scalar(self, two_hours, box_with_array):
18461851 xbox = np .ndarray if box is pd .array else box
18471852
18481853 tdi = timedelta_range ("1 days" , "10 days" , name = "foo" )
1849- expected = pd . Int64Index ((np .arange (10 ) + 1 ) * 12 , name = "foo" )
1854+ expected = Int64Index ((np .arange (10 ) + 1 ) * 12 , name = "foo" )
18501855
18511856 tdi = tm .box_expected (tdi , box )
18521857 expected = tm .box_expected (expected , xbox )
0 commit comments