How to find the largest entry in a matrix using loops
0
start with: import numpy as np A = np.asarray([[2, 0, -6, 0] [-4, 5, -4, 7] [1, 3, 7, 2] [0, 8, 1, 6]]) determine the total number of negative entries in the matrix, the largest of them (magnitude) and it's location. Print the above information (for example the display should show that there are 3 negative entries, with the largest negative value equal to -6, located at (1,3).) Use loops , not min and max functions.
python-3.x
share | improve this question
asked Nov 20 '18 at 0:31
kjfaksdjf kjfaksdjf
6 1