Skip to content

Commit

Permalink
Fix incorrect shape calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
jni committed Mar 21, 2017
1 parent b3cf537 commit f796c06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion skan/vendored/thresholding.py
Expand Up @@ -66,7 +66,7 @@ def correlate_sparse(image, kernel, mode='reflect'):
indices = np.nonzero(kernel)
offsets = np.ravel_multi_index(indices, padded_image.shape)
values = kernel[indices]
result = np.zeros([a + b + 1
result = np.zeros([a - b + 1
for a, b in zip(padded_image.shape, kernel.shape)])
corner_multi_indices = broadcast_mgrid([np.arange(i)
for i in result.shape])
Expand Down

0 comments on commit f796c06

Please sign in to comment.