Precision issues appear to have vanished

This commit is contained in:
Juan Nunez-Iglesias
2013-07-25 00:24:04 +10:00
parent af3ea5f817
commit 3e99079107
+1 -2
View File
@@ -78,8 +78,7 @@ def _slic_cython(double[:, :, :, ::1] image_zyx,
# squaring itself. mine can't (with O2)
tmp = image_zyx[z, y, x, c] - means[k, c]
dist_mean += tmp * tmp
# some precision issue here. Doesnt work if testing ">"
if distance[z, y, x] - dist_mean > 1e-10:
if distance[z, y, x] > dist_mean:
nearest_mean[z, y, x] = k
distance[z, y, x] = dist_mean
changes = 1