def lpgen_2d(m,n):
np.random.seed(<NUM_LIT:0>)<EOL>c = - np.random.exponential(size=(m,n))<EOL>Arow = np.zeros((m,m*n))<EOL>brow = np.zeros(m)<EOL>for j in range(m):<EOL><INDENT>j1 = j + <NUM_LIT:1><EOL>Arow[j,j*n:j1*n] = <NUM_LIT:1><EOL>brow[j] = n/m<EOL><DEDENT>Acol = np.zeros((n,m*n))<EOL>bcol = np.zeros(n)<EOL>for j in range(n):<EOL><INDENT>j1 = j + <NUM_LIT:1><EOL>Acol[j,j::n] = <NUM_LIT:1><EOL>bcol[j] = <NUM_LIT:1><EOL><DEDENT>A = np.vstack((Arow,Acol))<EOL>b = np.hstack((brow,bcol))<EOL>return A, b, c.ravel()<EOL>
-> A b c LP test: m*n vars, m+n constraints
        row sums == n/m, col sums == 1
        https://gist.github.com/denis-bz/8647461