Skip to content

Commit e6dccbf

Browse files
committed
Swap rows and columns in _repr_latex_
1 parent c7e1e10 commit e6dccbf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

control/xferfcn.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,11 @@ def _repr_latex_(self, var=None):
281281
else:
282282
outstr = "$$"
283283

284-
for i in range(self.inputs):
285-
for j in range(self.outputs):
284+
for i in range(self.outputs):
285+
for j in range(self.inputs):
286286
# Convert the numerator and denominator polynomials to strings.
287-
numstr = _tf_polynomial_to_string(self.num[j][i], var=var)
288-
denstr = _tf_polynomial_to_string(self.den[j][i], var=var)
287+
numstr = _tf_polynomial_to_string(self.num[i][j], var=var)
288+
denstr = _tf_polynomial_to_string(self.den[i][j], var=var)
289289

290290

291291
outstr += r"\frac{" + numstr + "}{" + denstr + "}"

0 commit comments

Comments
 (0)