Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gamma Function in Python

I'm fairly new to Python but would like to use Euler's Gamma Function in a function I am writing. I'd prefer not to write it as an integral and was wondering if there's something I can import that easily defines the gamma function.

Thanks

like image 603
Lanier Freeman Avatar asked Nov 29 '22 22:11

Lanier Freeman


2 Answers

Yes, you can. In the module math there are special functions coded such as the Gamma function.

Look at here

like image 145
MMF Avatar answered Dec 02 '22 11:12

MMF


I'd use scipy.special.gamma().

like image 42
Batman Avatar answered Dec 02 '22 11:12

Batman