title: Why does scipy.stats.entropy(a, b) return inf while scipy.stats.entropy(b, a) doesn't?
body: <pre><code>In [15]: a = np.array([0.5, 0.5, 0, 0, 0])
  
  In [16]: b = np.array([1, 0, 0, 0, 0])
  
  In [17]: entropy(a, b)
  Out[17]: inf
  
  In [18]: entropy(b, a)
  Out[18]: 0.6931471805599453
  </code></pre>
  
  <p>From their <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.entropy.html" rel="nofollow noreferrer">documentation</a>, I expected both to return <code>inf</code> since the equation given is <code>S = sum(pk * log(pk / qk), axis=0)</code>. What is the reason for the non-infinite output in line 18?</p>