title: np.random.choice: probabilities do not sum to 1
body: <p><strong>how can I use np.random.choice here?</strong>
  there is <code>p</code> that calculate by some opertation, like :</p>
  
  <pre><code> p=[  1.42836755e-01,   1.42836735e-01  , 1.42836735e-01,   1.42836735e-01
  ,   4.76122449e-05,   1.42836735e-01  , 4.76122449e-05  , 1.42836735e-01,
     1.42836735e-01,   4.76122449e-05]
  </code></pre>
  
  <p>usually sum p is not exact equal to 1:</p>
  
  <pre><code>&gt;&gt;&gt; sum(p)
  1.0000000017347
  </code></pre>
  
  <p>I want to make random choice by probabilities=p:</p>
  
  <pre><code>&gt;&gt;&gt; np.random.choice([1,2,3,4,5,6,7,8,9, 10], 4, p=p, replace=False)
  array([4, 3, 2, 9])
  </code></pre>
  
  <p>this work here! but in the program it has an error :</p>
  
  <pre><code>Traceback (most recent call last):
      indexs=np.random.choice(range(len(population)), population_number, p=p, replace=False)
    File "mtrand.pyx", line 1141, in mtrand.RandomState.choice (numpy/random/mtrand/mtrand.c:17808)
  ValueError: probabilities do not sum to 1
  </code></pre>
  
  <p>if I print the <code>p</code>:</p>
  
  <pre><code>[  4.17187500e-05   2.49937500e-01   4.16562500e-05   4.16562500e-05
     2.49937500e-01   4.16562500e-05   4.16562500e-05   4.16562500e-05
     2.49937500e-01   2.49937500e-01]
  </code></pre>
  
  <p>but it works, in python shell by this <code>p</code>:</p>
  
  <pre><code>&gt;&gt;&gt; p=[  4.17187500e-05 ,  2.49937500e-01   ,4.16562500e-05  , 4.16562500e-05,
     2.49937500e-01  , 4.16562500e-05  , 4.16562500e-05  , 4.16562500e-05,
     2.49937500e-01   ,2.49937500e-01]
  &gt;&gt;&gt; np.random.choice([1,2,3,4,5,6,7,8,9, 10], 4, p=p, replace=False)
  array([ 9, 10,  2,  5])
  </code></pre>
  
  <p><strong>UPDATE</strong>
  I have tested it by precision=15:</p>
  
  <pre><code> np.set_printoptions(precision=15)
   print(p)
  [  2.499375625000002e-01   2.499375000000000e-01   2.499375000000000e-01
     4.165625000000000e-05   4.165625000000000e-05   4.165625000000000e-05
     4.165625000000000e-05   4.165625000000000e-05   2.499375000000000e-01
     4.165625000000000e-05]
  </code></pre>
  
  <p>testing:</p>
  
  <pre><code>&gt;&gt;&gt; p=np.array([  2.499375625000002e-01   ,2.499375000000000e-01   ,2.499375000000000e-01,
     4.165625000000000e-05   ,4.165625000000000e-05,   4.165625000000000e-05,
     4.165625000000000e-05  , 4.165625000000000e-05 ,  2.499375000000000e-01,
     4.165625000000000e-05])
  &gt;&gt;&gt; np.sum(p)
  1.0000000000000002
  </code></pre>
  
  <p><strong>how fix this to use  np.random.choice ?</strong></p>