Open In App

Python | SymPy combinatorics.conjugate() method

Last Updated : 14 Aug, 2024
Comments
Improve
Suggest changes
Like Article
Like
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().conjugateReturn : 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.

Python3 1=1
# 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 :

Python3 1=1
# 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]


Next Article
Article Tags :
Practice Tags :

Similar Reads