Factorials: Difference between revisions
From charlesreid1
(Created page with "==Calculating Binomial Coefficients in Python== Because this is really annoyingly hard to find in the Scipy/Numpy documentation: <pre> In [1]: from scipy.special import comb...") |
No edit summary |
||
| Line 12: | Line 12: | ||
Out[3]: 1680.0 | Out[3]: 1680.0 | ||
</pre> | </pre> | ||
[[Category:Binomial]] | |||
[[Category:Combinatorics]] | |||
Latest revision as of 16:08, 29 November 2017
Calculating Binomial Coefficients in Python
Because this is really annoyingly hard to find in the Scipy/Numpy documentation:
In [1]: from scipy.special import comb, perm In [2]: comb(6,3) Out[2]: 20.0 In [3]: perm(8,4) Out[3]: 1680.0