{"id":27663,"date":"2022-08-16T00:00:29","date_gmt":"2022-08-15T18:30:29","guid":{"rendered":"https:\/\/python-programs.com\/?p=27663"},"modified":"2022-08-16T00:00:29","modified_gmt":"2022-08-15T18:30:29","slug":"python-sympy-matrix-col_del-method","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-sympy-matrix-col_del-method\/","title":{"rendered":"Python sympy.Matrix.col_del() Method"},"content":{"rendered":"

Python SymPy Module:<\/strong><\/p>\n

SymPy is a Python\u00a0symbolic mathematics<\/strong>\u00a0library. It aims to be a full-featured computer algebra system (CAS) while keeping the code as basic(simple) as possible in order to be understandable and easily expandable. SymPy is entirely written in Python. SymPy is simple to use because it only depends on mpmath, a pure Python library for arbitrary floating-point arithmetic.<\/p>\n

Rational and Integer are the numerical types defined by SymPy. A rational number is represented by the Rational class as a pair of two Integers, numerator and denominator, therefore Rational(1, 2) is 1\/2, Rational(3, 2) is 3\/2, and so on. Integer numbers are represented by the Integer class.<\/p>\n

SymPy uses mpmath in the background, allowing it to execute arbitrary-precision arithmetic computations. Some special constants, such as exp, pi, and oo (Infinity), are thus considered as symbols and can be evaluated with arbitrary precision.<\/p>\n

Installation:<\/strong><\/p>\n

pip install sympy<\/pre>\n

Python sympy.Matrix.col_del() Method:<\/strong><\/p>\n

We can delete the columns of a matrix using the sympy.Matrix.col_del() function.<\/p>\n

Syntax:<\/strong><\/p>\n

 sympy.Matrix().col_del()<\/pre>\n

Return Value:<\/strong><\/p>\n

A new matrix after the deletion of the column is returned by the Matrix.col_del() function.<\/p>\n

sympy.Matrix.col_del() Method in Python<\/h2>\n

For 2-Dimensional (2D) Matrix<\/strong><\/p>\n

Approach:<\/strong><\/p>\n