Closed Hou-Rui closed 5 years ago
There is a bug on line 624. _normalize_op_args()
is used for both columns and rows. It should have self.rows
instead of self.cols
when rows are handled. (Besides, there should be strict inequality 0 <= col2 < self.cols
even in the column case.)
This could be fixed by adding the number of columns/rows as an input parameter.
I was using sympy for elementary row operations when it raised an expected ValueError. The code is like this:
This code will raise
ValueError: This matrix doesn't have a row '5'
, but I'm pretty sure that the matrix does have a row 5. It works fine if I doC.elementary_row_op('n<->m', row1=2, row2=4)
.Strangely, if I add an additional column and doesn't change the count of rows at all, it will work fine:
I'm novice both in sympy and in linear algebra. Is it a bug or did I miss out something?
p.s. Screenshot attached:
Running in macOS 10.14, python 3.7, sympy 1.4.