The problem is that lines of A that represent the equalities don't have a one-to-one mapping to lines of code. What I do in my own work (Economics) is to have a function with a clear English name (or at least a single line of code, with no functional representation) for each of the rows of A. When necessary, I have a clear but slow or perhaps much longer version of the code that does the same thing as the code I ultimately use.
So for example (from Bretscher's Linear Algebra with Applications 1997, ex. 37 p. 29 a simple if unrealistic example), consider an economy with three industries, I1, I2, I3, each taking the other two industry outputs as inputs. What outputs should they produce to meet consumer and industrial demand?
A =np.zeros((3,3))
#Each unit of production by I1 requires 0.1 units of good 2 and .2 of good 3
A[:,0] = [0, 0.1, 0.2]
#Each unit of production by I2 requires 0.2 units of good 1 and .5 of good 3
A[:,1] = [0.2, 0, 0.5]
#Each unit of production by I3 requires 0.3 units of good 1 and .4 of good 2
A[:,2] = [0.3, 0.4, 0]
#The required production for consumers.
b = np.array([320,150,90]).reshape(-1,1)
#The optimal production levels of x1, x2, and x3
res = np.linalg.solve(A,b)
It perhaps would be slower or less terse to do what I suggest, but it would be much clearer to read.