Skip to content

Commit

Permalink
Minor.
Browse files Browse the repository at this point in the history
  • Loading branch information
hhoppe committed Dec 15, 2024
1 parent c75fc48 commit 57707f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resampler_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion resampler_notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 57707f0

Please sign in to comment.