mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-11 08:50:03 +08:00
Use log(2) instead of log10(2)
This commit is contained in:
@@ -279,7 +279,7 @@ cdef inline np.uint8_t kernel_entropy(Py_ssize_t * histo, float pop,
|
||||
for i in range(256):
|
||||
p = histo[i] / pop
|
||||
if p > 0:
|
||||
e -= p * log(p) / 0.30102999566398119521373889472449
|
||||
e -= p * log(p) / 0.6931471805599453
|
||||
|
||||
return < np.uint8_t > e * 10
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user