问题 I try to solve nonlinear programming task using scipy.optimize.minimize max r x1**2 + y1**2 <= (1-r)**2 (x1-x2)**2 + (y1-y2)**2 >= 4*r**2 0 <= r <= 1 So I've wrote next code: r = np.linspace(0, 1, 100) x1 = np.linspace(0, 1, 100) y1 = np.linspace(0, 1, 100) x2 = np.linspace(0, 1, 100) y2 = np.linspace(0, 1, 100) fun = lambda r: -r cons = ({'type': 'ineq', 'fun': lambda x1, r: [x1[0] ** 2 + x1[1] ** 2 - (1 - r) ** 2], 'args': (r,)}, {'type': 'ineq', 'fun': lambda x2, r: [x2[0] ** 2 + x2[1] **