#NEWLINE# def test_2d_other_dtypes( self ) : #NEWLINE# #INDENT# arr = np . random . randn ( 10 , 5 ) . astype ( np . float32 ) #NEWLINE# indexer = [ 1 , 2 , 3 , ( - 1 ) ] #NEWLINE# result = algos . take_nd ( indexer , indexer , axis = 0 ) #NEWLINE# expected = arr . take ( indexer , axis = 0 ) #NEWLINE# expected [ ( - 1 ) ] = np . nan #NEWLINE# tm . assert_almost_equal ( result , expected ) #NEWLINE# result = algos . take_nd ( arr , indexer , axis = 1 ) #NEWLINE# expected = arr . take ( indexer , axis = 1 ) #NEWLINE# expected [ : , ( - 1 ) ] = np . nan #NEWLINE# tm . assert_almost_equal ( result , expected )