Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

affine_transform: increased shape of required input array slices #216

Merged
merged 1 commit into from
May 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dask_image/ndinterp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def affine_transform(
rel_image_f[dim] = np.clip(rel_image_f[dim], 0, s - 1)

rel_image_slice = tuple([slice(int(rel_image_i[dim]),
int(rel_image_f[dim]) + 1)
int(rel_image_f[dim]) + 2)
for dim in range(n)])

rel_image = image[rel_image_slice]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def validate_affine_transform(n=2,

# define (random) transformation
if matrix is None:
matrix = np.eye(n) + (np.random.random((n, n)) - 0.5) / 5.
# make sure to substantially deviate from unity matrix
matrix = np.eye(n) + (np.random.random((n, n)) - 0.5) * 5.
if offset is None:
offset = (np.random.random(n) - 0.5) / 5. * np.array(image.shape)

Expand Down