scipy/scipy — pull request #3146 by WarrenWeckesser (2013-12-13 04:38:48+00:00)
Title: BUG: misc: comb returned incorrect result when given large np.int64 arguments

When given `exact=True`, cast the arguments of `comb` to python integers to
ensure that the result is a python integer. Otherwise a call with arguments
that are, for example, `np.int64` can return an incorrect result:

```
>>> comb(70, 30, exact=True) # correct result
55347740058143507128L
```

That result is too big for a 64 bit integer. Here's what we get with `comb`
before this pull request:

```
>>> comb(np.int64(70), np.int64(30), exact=True) # incorrect result
261655728644386326
```