sympy.Matrix.row_del()方法

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)
Python

Output :

Matrix([1, 2])
Bash

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)
Python

Output :

Matrix([[2, 3], [23, 45]])
Bash

Python教程

Java教程

Web教程

数据库教程

图形图像教程

大数据教程

开发工具教程

计算机教程

登录

注册