Row Example of Python Implementation Switch Matrix
- 2021-07-03 00:24:14
- OfStack
As shown below:
# TODO r1 <---> r2
# Modify the parameter matrix directly, and there is no return value
def swapRows(M, r1, r2):
M[r1],M[r2] = M[r2],M[r1]
pass