There's also a cython implementation but that gives only a mild speedup that won't be acceptable for large matrices. Need to write a C-extension to get a sizable speedup.
There's a lot of c-code around that can be used for the generation of Gaussian, beta and gamma variables. Here's one example of a LGPL library:
(Moved from pyEMMA#124)
Replace stallone-call to reversible transition matrix sampling by python code. The pure python code can be grabbed from here:
There's also a cython implementation but that gives only a mild speedup that won't be acceptable for large matrices. Need to write a C-extension to get a sizable speedup.
There's a lot of c-code around that can be used for the generation of Gaussian, beta and gamma variables. Here's one example of a LGPL library:
I suggest to extract what we need and use it in the C-extension (remember to reference the original source)