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

Unable to complete ipynb notebook due to error #2

Open
ishiry opened this issue Apr 12, 2017 · 1 comment
Open

Unable to complete ipynb notebook due to error #2

ishiry opened this issue Apr 12, 2017 · 1 comment

Comments

@ishiry
Copy link

ishiry commented Apr 12, 2017

Hello, we have problem from column "Collect all available patches of each class from the given image". There is an error. We use the script that have converted to version python 3 in windows.
error1
We hope that you could give some input and information regarding this error.

thisisashukla added a commit to thisisashukla/Hyperspectral that referenced this issue Aug 11, 2017
I faced the same error while using the project. Thanks to @ishiry for mentioning it in [Issue 2](KGPML#2)
The error occurs because of default devision in python outputs a float. At line number 6 in In[8] `curr_tar = target_mat[i + (PATCH_SIZE - 1)/2, j + (PATCH_SIZE - 1)/2]` the division by 2 operation create float output which is not accepted by `target_mat` variable because it needs integer as indexes. 
I have rectified the issue by adding explicit type conversion for the float output to integer by making the line `curr_tar = target_mat[i + int((PATCH_SIZE - 1)/2), j + int((PATCH_SIZE - 1)/2)]\n`
After making the change, the code is running fine on my machine

@project Admin please review the changes and accept the PR if it is correct.
manila95 added a commit that referenced this issue Aug 12, 2017
@thisisashukla
Copy link
Contributor

@admin please close the issue

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

2 participants