#NEWLINE# def test_convert_objects_ints( ) : #NEWLINE# #INDENT# dtypes = [ 'i1' , 'i2' , 'i4' , 'i8' , 'u1' , 'u2' , 'u4' , 'u8' ] #NEWLINE# for dtype_str in dtypes : #NEWLINE# #INDENT# arr = np . array ( list ( np . arange ( 20 , dtype = dtype_str ) ) , dtype = 'O' ) #NEWLINE# assert ( arr [ 0 ] . dtype == np . dtype ( dtype_str ) ) #NEWLINE# result = lib . maybe_convert_objects ( arr ) #NEWLINE# assert issubclass ( result . dtype . type , np . integer )