title: numpy multinomial function returns value error
body: <p>I am using the <code>numpy.random.multinomial(1,val)</code> <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.multinomial.html" rel="nofollow">NumpyMultinomial</a>, where val is a 1-D numpy array. The function gives the following error:</p>
  
  <blockquote>
    <p>ValueError('sum(pvals[:-1]) > 1.0',)</p>
  </blockquote>
  
  <p>However, I checked the sum of the input array val using <code>val.sum()</code> and it sums exactly to 1. I don't know if the multinomial function has some bug. Can some one help me out with this. Alternatively, is there any other python module that I can use for sampling using multinomial distribution?</p>