借助sympy.combinatorics.IntegerPartition().as_ferrers()
方法,我們可以通過使用來獲得分區值的ferrer圖sympy.combinatorics.IntegerPartition().as_ferrers()
方法。
用法: sympy.combinatorics.IntegerPartition().as_ferrers()
返回:返回費雷爾圖。
範例1:
在這個例子中,我們可以通過使用sympy.combinatorics.IntegerPartition().as_ferrers()
方法,我們可以得到費雷爾圖。
# import sympy and IntegerPartition
from sympy.combinatorics.partitions import IntegerPartition
from sympy import *
# Using sympy.combinatorics.partitions.IntegerPartition().as_ferrers() method
gfg = IntegerPartition([1] + [2, 3]).as_ferrers()
print(gfg)
輸出:
###
##
#
範例2:
# import sympy and IntegerPartition
from sympy.combinatorics.partitions import IntegerPartition
from sympy import *
# Using sympy.combinatorics.partitions.IntegerPartition().as_ferrers() method
gfg = IntegerPartition([1] + [2, 3] + [4] + [5]).as_ferrers(char ='$')
print(gfg)
輸出:
$$$$$
$$$$
$$$
$$
$
相關用法
- Python sympy.S()用法及代碼示例
- Python sympy.Pow()用法及代碼示例
- Python sympy.ff()用法及代碼示例
- Python sympy.apart()用法及代碼示例
- Python sympy.det()用法及代碼示例
- Python sympy.crt()用法及代碼示例
- Python sympy.has()用法及代碼示例
- Python sympy.gcd()用法及代碼示例
- Python sympy.lcm()用法及代碼示例
- Python sympy.ones()用法及代碼示例
- Python sympy.eye()用法及代碼示例
- Python sympy.cot()用法及代碼示例
- Python sympy.csc()用法及代碼示例
- Python sympy.div()用法及代碼示例
- Python sympy.nT()用法及代碼示例
注:本文由純淨天空篩選整理自Jitender_1998大神的英文原創作品 Python | sympy as_ferrers() method。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。