Python SymPy combinatorics.conjugate()方法

Python SymPy combinatorics.conjugate()方法

sympy.combinatorics.partitions.IntegerPartition().conjugate方法的帮助下,我们可以得到sympy.combinatorics.partitions.IntegerPartition()方法中作为参数传递的整数阵列的共轭值。

语法: sympy.combinatorics.partitions.IntegerPartition().conjugate
返回:返回整数阵的共轭值。

例子#1 :
在这个例子中,我们可以看到,通过使用sympy.combinatorics.partitions.IntegerPartition().conjugate方法,我们能够得到作为参数传递的数组的共轭值。

# 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)

输出 :

[3, 2, 1]

例子#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)

输出 :

[7, 5, 3, 1]

Python教程

Java教程

Web教程

数据库教程

图形图像教程

大数据教程

开发工具教程

计算机教程