Skip to content

Commit

Permalink
Fixed patch slices generation in PatchSampler to always retrieve patc…
Browse files Browse the repository at this point in the history
…hes of the defined shape
  • Loading branch information
fercer committed May 2, 2024
1 parent b894985 commit aaa51f6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions zarrdataset/_samplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,7 @@ def _compute_toplefts_slices(self, mask: ImageBase, image_shape: dict,
+ tls[mask.axes.index(ax)] + patch_size[ax])

curr_tl.append((ax, slice(tl - pad[ax],
(br if br <= image_shape[ax]
else image_shape[ax])
+ pad[ax])))
br + pad[ax])))

else:
curr_tl.append((ax, slice(0, 1)))
Expand Down

0 comments on commit aaa51f6

Please sign in to comment.