Skip to content

Commit 21c44fd

Browse files
committed
TST: Check for type promotion in numeric operations on indexes.
1 parent 76571d0 commit 21c44fd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/test_index.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,6 +1909,12 @@ def test_astype(self):
19091909
self.assertTrue(i.equals(result))
19101910
self.check_is_index(result)
19111911

1912+
def test_promote_type(self):
1913+
# GH-9966
1914+
index_int = Int64Index(np.arange(5))
1915+
index_promoted = index_int * 0.333
1916+
self.assertIsInstance(index_promoted, Float64Index)
1917+
19121918
def test_equals(self):
19131919

19141920
i = Float64Index([1.0,2.0])

0 commit comments

Comments
 (0)