#NEWLINE# def test_getslice_tuple( self ) : #NEWLINE# #INDENT# dense = np . array ( [ np . nan , 0 , 3 , 4 , 0 , 5 , np . nan , np . nan , 0 ] ) #NEWLINE# sparse = SparseArray ( dense ) #NEWLINE# res = sparse [ 4 : ] #NEWLINE# exp = SparseArray ( dense [ 4 : ] ) #NEWLINE# tm . assert_sp_array_equal ( res , exp ) #NEWLINE# sparse = SparseArray ( dense , fill_value = 0 ) #NEWLINE# res = sparse [ 4 : ] #NEWLINE# exp = SparseArray ( dense [ 4 : ] , fill_value = 0 ) #NEWLINE# tm . assert_sp_array_equal ( res , exp ) #NEWLINE# with tm . assertRaises ( IndexError ) : #NEWLINE# #INDENT# res [ 4 : , : ] #NEWLINE# #UNINDENT# with tm . assertRaises ( IndexError ) : #NEWLINE# #INDENT# dense [ 4 : , : ]