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

Crash when upsampling using 'box' mode? #1

Open
noamgat opened this issue May 18, 2020 · 0 comments
Open

Crash when upsampling using 'box' mode? #1

noamgat opened this issue May 18, 2020 · 0 comments

Comments

@noamgat
Copy link

noamgat commented May 18, 2020

The following code generates an exception:
test_im = np.zeros((29,25,4))
imresize(test_im, output_shape=(40, 40, 4), kernel='box')

Traceback (most recent call last):
File "C:/Users/Noam/AppData/Roaming/JetBrains/PyCharm2020.1/scratches/scratch_1.py", line 232, in
imresize(test_im, output_shape=(40, 40, 4), kernel='box')
File "C:/Users/Noam/AppData/Roaming/JetBrains/PyCharm2020.1/scratches/scratch_1.py", line 43, in imresize
out_im = resize_along_dim(out_im, dim, weights, field_of_view)
File "C:/Users/Noam/AppData/Roaming/JetBrains/PyCharm2020.1/scratches/scratch_1.py", line 151, in resize_along_dim
tmp_out_im = np.sum(tmp_im[field_of_view.T] * weights, axis=0)
IndexError: index 4 is out of bounds for axis 0 with size 4
Process finished with exit code 1

Is this expected behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant