python numpy log2 returns -inf when using Popen : <p>I am trying to run this line:</p>

<pre><code>print(np.log2( (ngram_list.count(('i',)) + 1 )/( 100000 + len(set(n1gram_list)) )))
</code></pre>

<p>When I run my script from terminal I get -1.54814270552.
But when I run the same script via subprocess.Popen I get -inf.
Basically every time the output of log2 is positive I get the right output in both method but for negative values I get -inf only when using Popen.</p>
