Python | sympy.Matrix.row() method
With the help of sympy.Matrix.row() method, we can extract the rows of the matrix.
Syntax :
sympy.Matrix.row()
Return : Return the row of a matrix.
Example #1 :
In the given example we can see that the
sympy.Matrix().row() method is used to extract the rows of a matrix.
# Import all the methods from sympy from sympy import * # use the row() method for matrix gfg_val = Matrix([[1, 2], [2, 1]]).row(1) print(gfg_val) |
chevron_right
filter_none
Output :
[2, 1]
Example #2 :
from sympy import * # use the row() method for matrix gfg_val = Matrix([[1, 2], [2, 3], [23, 45]]).row(2) print(gfg_val) |
chevron_right
filter_none
Output :
[23, 45]
Recommended Posts:
- class method vs static method in Python
- Python | set() method
- Python | os.dup() method
- Python | next() method
- Python | os.pread() method
- Python | os.fsencode() method
- Python | os.isatty() method
- Python | os.device_encoding() method
- Python | setattr() method
- Python | os.system() method
- Python | os.sched_rr_get_interval() method
- Python | Decimal ln() method
- Python | os._exit() method
- Python | os.WEXITSTATUS() method
- Python | os.abort() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



