#NEWLINE# def argmaxDiff( Y ) : #NEWLINE# #INDENT# Y2 = Y . reshape ( ( Y . size / Y . shape [ ( - 1 ) ] ) , Y . shape [ ( - 1 ) ] ) #NEWLINE# Ydiff = np . zeros ( Y2 . shape ) #NEWLINE# for i in range ( ( Y2 . shape [ 1 ] - 1 ) ) : #NEWLINE# #INDENT# Ydiff [ : , i ] = ( Y2 [ : , ( i + 1 ) ] - Y2 [ : , i ] ) #NEWLINE# #UNINDENT# Ydiff2 = np . reshape ( Ydiff , Y . shape ) #NEWLINE# return np . argmax ( Ydiff2 , axis = ( - 1 ) )