Artificial intelligent assistant

How to sample from a Gamma distribution with shape not integer I'm looking for an effective method to sample from a _Gamma distribution_ that has the **shape** parameter **not integer**. However, I found everywhere the method to sample from a Gamma with an integer shape (that is as a matter of fact an Erlang distribution). I found this paper about an method for sampling from a Gamma. Unfortunately, I don't understand how to implement it! Any suggestion?

See Devroye "Non-Uniform Random Variate Generation" Section IX.3.2 (it is freely available online). Several algorithms are explained in detail there with pseudo-code, so it will be quick to code.

\-- Monseigneur Myriel

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 7b8b7c59efaf57c5508739ef013e3c4a