mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-24 13:20:43 +08:00
Precision issues appear to have vanished
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user