Python | sympy RGS method
With the help of sympy.combinatorics.Partition().RGS method, we are able to get the index value of members of subarray in the way that it is passed in the Partition() method by using sympy.combinatorics.Partition().RGS method.
Syntax :
sympy.combinatorics.Partition().RGSReturn : Return tuple of index values.
Example #1 :
In this example we can see that by using
In this example we can see that by using
sympy.combinatorics.Partition().RGS method, we can get the index values of members of subarray in one tuple.
# import sympy and Relational from sympy.combinatorics.partitions import Partition from sympy import * x, y = symbols('x y') # Using from sympy.combinatorics.partitions.Partition() method gfg = Partition([1, 2], [4, 5, 6], [-12, -11]) print(gfg.RGS) |
chevron_right
filter_none
Output :
(0, 0, 1, 1, 2, 2, 2)
Example #2 :
# import sympy and Relational from sympy.combinatorics.partitions import Partition from sympy import * x, y = symbols('x y') # Using from sympy.combinatorics.partitions.Partition() method gfg = Partition([3], [1, 91], [2], [6]) print(gfg.RGS) |
chevron_right
filter_none
Output :
(0, 1, 2, 3, 0)
Recommended Posts:
- Python | sympy.nT() method
- Python | sympy.S() method
- Python | sympy.sec() method
- Python | sympy.nP() method
- Python | sympy.gcd() method
- Python | sympy.ff() method
- Python | sympy.apart() method
- Python | sympy.rf() method
- Python | sympy.tan() method
- Python | sympy.apart() method
- Python | sympy.Add() method
- Python | sympy.sin() method
- Python | sympy.eye() method
- Python | sympy.det() method
- Python | sympy.csc() 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.



