#NEWLINE# def test_int_index( self ) : #NEWLINE# #INDENT# from pandas.core.series import Series #NEWLINE# arr = np . random . randn ( 100 , 4 ) #NEWLINE# result = lib . reduce ( arr , np . sum , labels = Index ( np . arange ( 4 ) ) ) #NEWLINE# expected = arr . sum ( 0 ) #NEWLINE# assert_almost_equal ( result , expected ) #NEWLINE# result = lib . reduce ( arr , np . sum , axis = 1 , labels = Index ( np . arange ( 100 ) ) ) #NEWLINE# expected = arr . sum ( 1 ) #NEWLINE# assert_almost_equal ( result , expected ) #NEWLINE# dummy = Series ( 0.0 , index = np . arange ( 100 ) ) #NEWLINE# result = lib . reduce ( arr , np . sum , dummy = dummy , labels = Index ( np . arange ( 4 ) ) ) #NEWLINE# expected = arr . sum ( 0 ) #NEWLINE# assert_almost_equal ( result , expected ) #NEWLINE# dummy = Series ( 0.0 , index = np . arange ( 4 ) ) #NEWLINE# result = lib . reduce ( result , np . sum , axis = 1 , dummy = dummy , labels = Index ( np . arange ( 100 ) ) ) #NEWLINE# expected = arr . sum ( 1 ) #NEWLINE# assert_almost_equal ( result , expected ) #NEWLINE# result = lib . reduce ( arr , np . sum , axis = 1 , dummy = dummy , labels = Index ( np . arange ( 100 ) ) ) #NEWLINE# assert_almost_equal ( result , expected )