@@ -21,6 +21,7 @@ def setUp(self):
2121 self .strIndex = tm .makeStringIndex (100 )
2222 self .dateIndex = tm .makeDateIndex (100 )
2323 self .intIndex = tm .makeIntIndex (100 )
24+ self .floatIndex = tm .makeFloatIndex (100 )
2425 self .empty = Index ([])
2526 self .tuples = Index (zip (['foo' , 'bar' , 'baz' ], [1 , 2 , 3 ]))
2627
@@ -267,6 +268,12 @@ def testit(index):
267268 # self.assert_(empty is NULL_INDEX)
268269 # self.assert_(self.dateIndex[15:15] is NULL_INDEX)
269270
271+ def test_is_numeric (self ):
272+ self .assert_ (not self .dateIndex .is_numeric ())
273+ self .assert_ (not self .strIndex .is_numeric ())
274+ self .assert_ (self .intIndex .is_numeric ())
275+ self .assert_ (self .floatIndex .is_numeric ())
276+
270277 def test_is_all_dates (self ):
271278 self .assert_ (self .dateIndex .is_all_dates )
272279 self .assert_ (not self .strIndex .is_all_dates )
@@ -829,6 +836,10 @@ def test_contains(self):
829836 def test_is_all_dates (self ):
830837 self .assert_ (not self .index .is_all_dates )
831838
839+ def test_is_numeric (self ):
840+ # MultiIndex is never numeric
841+ self .assert_ (not self .index .is_numeric ())
842+
832843 def test_getitem (self ):
833844 # scalar
834845 self .assertEquals (self .index [2 ], ('bar' , 'one' ))
0 commit comments