The number of combinations of N things taken k at a time. This is often expressed as “N choose k”.
Parameters : | N : int, array
k : int, array
exact : int, optional
|
---|---|
Returns : | val : int, array
|
Notes
Examples
>>> k = np.array([3, 4])
>>> n = np.array([10, 10])
>>> sc.comb(n, k, exact=False)
array([ 120., 210.])
>>> sc.comb(10, 3, exact=True)
120L