sympy.Matrix.row_del()方法
利用sympy.Matrix.row_del()方法,我们可以删除矩阵的行。
语法:sympy.Matrix.row_del()
返回:返回一个新的矩阵。
sympy.Matrix.row_del()方法 例# 1:
在给定的示例中,我们可以看到sympy.Matrix.row_del()方法用于删除矩阵的行并返回一个新矩阵.
# Import all the methods from sympy
from sympy import *
# use the row_del() method for matrix
gfg_val = Matrix([[1, 2], [2, 1]]).col_row(1)
print(gfg_val)
Output :
Matrix([1, 2])
sympy.Matrix.row_del()方法 例# 2:
from sympy import *
# use the row_del() method for matrix
gfg_val = Matrix([[1, 2], [2, 3], [23, 45]]).row_del(0)
print(gfg_val)
Output :
Matrix([[2, 3], [23, 45]])