📜  SymPy | Python中的 Partition.as_ferrers()

📅  最后修改于: 2022-05-13 01:55:11.485000             🧑  作者: Mango

SymPy | Python中的 Partition.as_ferrers()

Partition.as_ferrers() : as_ferrers()是一个 sympy Python库函数,它根据提到的字符返回分区的 ferrer 图。

代码 #1:as_ferrers() 示例

# Python code explaining
# SymPy.as_ferrers()
  
# importing SymPy libraries
from sympy.combinatorics.partitions import Partition
from sympy.combinatorics.partitions import IntegerPartition
  
# Using from sympy.combinatorics.partitions.Partition.as_ferrers() method 
print(IntegerPartition([5, 2, 5]).as_ferrers())

输出 :

代码 #2:as_ferrers(char = '*') 示例

# Python code explaining
# SymPy.as_ferrers()
  
# importing SymPy libraries
from sympy.combinatorics.partitions import Partition
from sympy.combinatorics.partitions import IntegerPartition
  
# Using from sympy.combinatorics.partitions.Partition.as_ferrers() method 
print(IntegerPartition([1, 2, 3, 4]).as_ferrers(char = '*'))

输出 :