本文簡要介紹 python 語言中 scipy.special.factorialk
的用法。
用法:
scipy.special.factorialk(n, k, exact=True)#
k 階 n 的多因子,n(!!…!)。
這是 n 跳過 k 值的多因子。例如,
factorialk(17, 4) = 17!!!! = 17 * 13 * 9 * 5 * 1
特別是,對於任何整數
n
,我們有factorialk(n, 1) = factorial(n)
factorialk(n, 2) = factorial2(n)
- n: int 或 數組
多因子計算。如果 n < 0,則返回值為 0。
- k: int
多因子的順序。
- exact: 布爾型,可選
如果精確設置為真,則使用整數算術精確計算答案。
- val: int
n的多因子。
- NotImplementedError
當精確為 False 時引發
參數 ::
返回 ::
拋出 ::
例子:
>>> from scipy.special import factorialk >>> factorialk(5, 1, exact=True) 120 >>> factorialk(5, 3, exact=True) 10
相關用法
- Python SciPy special.factorial用法及代碼示例
- Python SciPy special.factorial2用法及代碼示例
- Python SciPy special.fdtridfd用法及代碼示例
- Python SciPy special.fdtrc用法及代碼示例
- Python SciPy special.fresnel用法及代碼示例
- Python SciPy special.fdtr用法及代碼示例
- Python SciPy special.fdtri用法及代碼示例
- Python SciPy special.exp1用法及代碼示例
- Python SciPy special.expn用法及代碼示例
- Python SciPy special.ncfdtri用法及代碼示例
- Python SciPy special.gamma用法及代碼示例
- Python SciPy special.y1用法及代碼示例
- Python SciPy special.y0用法及代碼示例
- Python SciPy special.ellip_harm_2用法及代碼示例
- Python SciPy special.i1e用法及代碼示例
- Python SciPy special.smirnovi用法及代碼示例
- Python SciPy special.ker用法及代碼示例
- Python SciPy special.ynp_zeros用法及代碼示例
- Python SciPy special.k0e用法及代碼示例
- Python SciPy special.j1用法及代碼示例
- Python SciPy special.logsumexp用法及代碼示例
- Python SciPy special.expit用法及代碼示例
- Python SciPy special.polygamma用法及代碼示例
- Python SciPy special.nbdtrik用法及代碼示例
- Python SciPy special.nbdtrin用法及代碼示例
注:本文由純淨天空篩選整理自scipy.org大神的英文原創作品 scipy.special.factorialk。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。