Open In App

Python | SymPy combinatorics.conjugate() method

Improve
Improve
Like Article
Like
Save
Share
Report

With the help of sympy.combinatorics.partitions.IntegerPartition().conjugate method, we can get the conjugate value of integer array passed as parameter in the sympy.combinatorics.partitions.IntegerPartition() method.

Syntax : sympy.combinatorics.partitions.IntegerPartition().conjugate
Return : Return the conjugate value of integer array.

Example #1 :
In this example we can see that by using sympy.combinatorics.partitions.IntegerPartition().conjugate method, we are able to get the conjugate value of array passed as a parameter.




# import sympy and IntegerPartition
from sympy.combinatorics.partitions import IntegerPartition
from sympy import *
    
# Using sympy.combinatorics.partitions.IntegerPartition().conjugate method
gfg = IntegerPartition([1, 2, 3])
    
print(gfg.conjugate)


Output :

[3, 2, 1]

Example #2 :




# import sympy and IntegerPartition
from sympy.combinatorics.partitions import IntegerPartition
from sympy import *
    
# Using sympy.combinatorics.partitions.IntegerPartition().conjugate method
gfg = IntegerPartition([1, 2, 3, 4, 3, 2, 1])
    
print(gfg.conjugate)


Output :

[7, 5, 3, 1]


Last Updated : 26 Aug, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads