I have a matrix A of size m x m
and while using scipy, I need to define the inequality constraint in python for items of this matrix that verifies:
I managed to define the bounds between -1 and 1 :
in python as follows:
# -1 <= a[i][j] <= 1
bnds_a_s_t = [(-1,1) for _ in range(np.size(A))]
But I don't know how to define the inequality constraint. Should I use a for loop with 2 pointers and add them to a list of inequality constraints? In this case, what should I return from the inequality function? In the equations, M is a list of size m.