0
A
回答
5
是的,你可以。在模塊math
中有特殊功能編碼,如Gamma功能。
看here
2
我會用scipy.special.gamma()
。
0
如果你想深入Python和其他方法,我會建議你看看numpy和scipy庫。
伽瑪功能可以那麼容易,因爲
from scipy.stats import gamma
a = 1.99323054838
rv = gamma(a)
就是這樣,檢查https://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.stats.gamma.html#scipy.stats.gamma獲取更多信息和https://www.scipy.org/,如果你想了解更多關於使用Python的科學計算。
+3
這與歐拉伽馬的伽馬不同。 – Batman
相關問題
- 1. 任意精度gamma函數
- 2. 如何繪製python中的alpha和beta參數的gamma分佈
- 3. Gamma分佈
- 4. 如何執行kolmogorov-Smirnov測試以測試Gamma函數?
- 5. Python中的函數
- 6. python中的函數
- 7. 函數中的Python參數
- 8. 函數中的參數python
- 9. 整體亮度/ gamma?
- 10. 函數錯誤中的Python函數?
- 11. C++中的Gamma分佈隨機變量
- 12. 如何繪製ggplot2中的Gamma分佈
- 13. Python中的中斷函數
- 14. Python中的封閉函數
- 15. Python中的繪圖函數
- 16. Python中的Flipside函數
- 17. python中的arctan(x)函數
- 18. 列表中的Python函數
- 19. Python類中的Alphabetizing函數
- 20. Python中的構造函數
- 21. Python中函數的別名
- 22. Python中的重試函數
- 23. Python中的內函數
- 24. Python中的隨機函數
- 25. python中的函數問題
- 26. Python中的Dir函數
- 27. python中的matlab ismember函數
- 28. 函數中的Python變量?
- 29. 背景中的Python函數
- 30. Python中的raw_input函數
如果你想要一個任意的精度伽馬函數,看看[mpmath](http://mpmath.org/doc/current/functions/gamma.html)。 –
看起來像它在標準庫中。 '來自數學進口gamma; gamma(10);' –
@AsadSaeeduddin當然(如果你有Python 2.7或更高版本)。但與mpmath版本不同,它不處理複數(並且cmath中沒有gamma),當然這不是任意的精確度。 –