diff --git a/resampler_notebook.ipynb b/resampler_notebook.ipynb index 2f2a63e..c2167cd 100644 --- a/resampler_notebook.ipynb +++ b/resampler_notebook.ipynb @@ -9696,7 +9696,7 @@ " out[y, x] = image[y, x] * (num_levels - np.finfo(float).eps)\n", " # Propagate the quantization residual.\n", " residual = image[y, x] - out[y, x] / (num_levels - 1)\n", - " for (dy, dx), weight in zip(offsets, weights):\n", + " for (dy, dx), weight in zip(offsets, weights, strict=True):\n", " yy, xx = y + dy, x + dx\n", " if yy < height and 0 <= xx < width:\n", " image[yy, xx] += residual * weight\n", diff --git a/resampler_notebook.py b/resampler_notebook.py index 66e97ee..da50539 100644 --- a/resampler_notebook.py +++ b/resampler_notebook.py @@ -4121,7 +4121,7 @@ def dither( out[y, x] = image[y, x] * (num_levels - np.finfo(float).eps) # Propagate the quantization residual. residual = image[y, x] - out[y, x] / (num_levels - 1) - for (dy, dx), weight in zip(offsets, weights): + for (dy, dx), weight in zip(offsets, weights, strict=True): yy, xx = y + dy, x + dx if yy < height and 0 <= xx < width: image[yy, xx] += residual * weight