Binomial Coefficients in NumPy/SciPy

For some reason finding how to compute the binomial coefficients using Numpy/SciPy is harder than it should (I couldn't find the answer in the first page of a google search).

The answer, though, is quite easy: just use scipy.special.binom. For example:

>> import scipy
>> print scipy.special.binom(10,5)
252.0

Follow

atom feed twittergithubgplus