numpy/numpy — pull request #4687 by wa03 (2014-05-08 14:55:01+00:00)
Title: BUG: mtrand binomial algorithm is different from original paper algorithm

Proposed fix for issue 2012:
https://github.com/numpy/numpy/issues/2012

Also relevant is the discussion on scipy-user:
http://mail.scipy.org/pipermail/scipy-user/2012-October/033299.html

The else block should not be conditional (i.e., remove the else, {, }, and properly indent).
Also the counting variables need a +1.