import numpy as np
data = np.array([[12, 13, 12], [10, 31, 9]])
def saddle_point(arr):
max_col = np.amax(arr, axis=0)
min_row = np.amin(arr, axis=1)
result = []
for i in range(len(min_row)):
for j in range(len(max_col)):
if max_col[j] == min_row[i]:
result.append("Седловая точка - " + str(min_row[i]) + " её координаты - " + str(i+1) + ", " + str(j+1))
if result != []:
return result;
else:
return "Седловой точки нет"
print(saddle_point(data))