To find the maximal value in a matrix of numbers, we can code 5 lines to solve the problem:
ans = matrix[0][0] for x in range(len(matrix)): for y in rang
using numpy.amax:
numpy.amax
import numpy as np >>> my_array array([[1, 2, 3], [9, 8, 6]]) >>> np.amax(my_array) 9