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

Undefined Var #17

Closed
manishkakwani opened this issue Dec 18, 2016 · 3 comments
Closed

Undefined Var #17

manishkakwani opened this issue Dec 18, 2016 · 3 comments

Comments

@manishkakwani
Copy link

In P1.ipynb, there are two places where you write: "plt.imshow(gray, cmap='gray')," what is gray (the variable, not the string)? Isn't that just an undefined variable? Did you mean to write "plt.imshow(image, cmap='gray')" in the first instance and "plt.imshow(img, cmap='gray')" in the second?

@ryan-keenan
Copy link
Contributor

These comments are just to guide you toward using the gray colormap, cmap="gray", when displaying a single color channel image. The variable name gray is used assuming you might call the grayscale() function like: gray = grayscale(image). Before these comments were added people were trying to use plt.imshow(gray) for single color channel images and getting strange results.

@manishkakwani
Copy link
Author

Hi Ryan,

Thanks, that's helpful. Would it be possible to update the README to specify that gray is var representing the result of calling the grayscale transform?

@ryan-keenan
Copy link
Contributor

Hey, sure, so what I've done to be a bit more explicit is to add a few words to the comment strings where those suggestions are made. I feel like in the readme they might get missed. Thanks for helping improve the project!

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