title: Alternative to numpy.random.binomial that allows 64 bits or more?
body: <p>I need to randomly generate a series of numbers according to the binomial distribution. Numpy's random suite provides a means to do this, but unfortunately it seems to be limited to handling 32-bit numbers for the value of <em>n</em> and I want to work with values outside that range. 64-bits should suffice, although arbitrarily higher precision would work just as well.</p>
  
  <p>Example output:</p>
  
  <pre><code>&gt;&gt;&gt; np.random.binomial(1&lt;&lt;40, 0.5)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "mtrand.pyx", line 3506, in mtrand.RandomState.binomial (numpy\random\mtrand\mtrand.c:16555)
  OverflowError: Python int too large to convert to C long
  </code></pre>
  
  <p>Is there an alternative I could use? Or a means to get numpy to use 64-bit numbers internally in this random generator?</p>
  
  <p>Or do I need to saddle up and roll my own?</p>
  
  <p>(As pointed out by Robert Klein, numpy does do 64-bit on 64-bit platforms except Windows; unfortunately I'm using Windows).</p>