I have a (3,3) numpy array and would like to figure out the sign of the element whose absolute value is maximum:
X = [[-2.1, 2, 3],
[ 1, -6.1, 5],
[ 0, 1, 1]]
s = numpy.argmax(numpy.abs(X),axis=0)
gives me the indices of the elements that I need, s = [ 0,1,1].
How can I use this array to extract the elements [ -2.1, -6.1, 5] to figure out their sign?