[SciPy-user] Python fn for Pascal's coefficient?
Tue Jun 10 01:39:45 CDT 2008
On Tue, Jun 10, 2008 at 01:28, Stephen McInerney
> Sorry to ask such a basic question, but I searched and I can't find
> a function for Pascal's coefficient, either in standard Python, SciPy or
I presume you mean a function for the binomial coefficients ("Pascal's
coefficient" appears to be a fairly rare term, at least in English
In : from scipy.misc import comb
In : comb?
Base Class: <type 'function'>
String Form: <function comb at 0x1b33d70>
Definition: comb(N, k, exact=0)
Combinations of N things taken k at a time.
If exact==0, then floating point precision is used, otherwise
exact long integer is computed.
- Array arguments accepted only for exact=0 case.
- If k > N, N < 0, or k < 0, then a 0 is returned.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the SciPy-user