Use log(2) instead of log10(2)

This commit is contained in:
Christoph Gohlke
2013-02-24 08:57:53 -08:00
parent bf4709155d
commit 27b837b799
+1 -1
View File
@@ -274,7 +274,7 @@ cdef inline np.uint16_t kernel_entropy(Py_ssize_t * histo, float pop,
for i in range(maxbin):
p = histo[i] / pop
if p > 0:
e -= p * log(p) / 0.30102999566398119521373889472449
e -= p * log(p) / 0.6931471805599453
return < np.uint16_t > e * 1000
else: