-
-
Notifications
You must be signed in to change notification settings - Fork 26k
[MRG] Fixed warnings mentioned in #11554 #11670
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
Conversation
Hi there, just saw your Q via the mailing list. So, the Travis issue is due to pep8 violations (a Python style guide, more info here: https://www.python.org/dev/peps/pep-0008/) E.g., if you look at the logs in the travis report, you see sth like
That essentially indicates you are missing a white space between the function arguments. I.e., instead of
write
I recommend using a pep8 or flake8 plugin for your text editor that highlights these issues. Or you could run pep8 or flake8 tool to before resubmitting the code to make sure you catch all of these. Flake8 is basically an advanced version of the pep8 tool (= a tool for Python that checks for PEP8 style), where it also checks for unused variable names, unused imports, etc. After installing flake8 (https://pypi.org/project/flake8/; e.g., via |
@@ -2,7 +2,7 @@ | |||
================================================ | |||
Segmenting the picture of greek coins in regions | |||
================================================ | |||
|
|||
p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is probably a typo, right?
@@ -36,7 +36,7 @@ | |||
# Applying a Gaussian filter for smoothing prior to down-scaling | |||
# reduces aliasing artifacts. | |||
smoothened_coins = gaussian_filter(orig_coins, sigma=2) | |||
rescaled_coins = rescale(smoothened_coins, 0.2, mode="reflect") | |||
rescaled_coins = rescale(smoothened_coins, 0.2, mode="reflect",multichannel=False,anti_aliasing=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add whitespace after each comment. Then split the line so it doesn't exceed 80 char
Thank you very much @rasbt ! That makes so much sense now ! |
No problem. The reason for the other error (the unrecognized scikit-learn/.circleci/config.yml Line 49 in 6e94a63
but should probably be discussed with the core devs |
sure. check build_tools/circle
|
And I think the value for ${SCIKIT_IMAGE_VERSION:-*} is coming from the file .circleci/congif.yml (SCIKIT_IMAGE_VERSION: 0.9.3 - line 49) |
Sure you do.
|
It is only "hidden" because that is the conventional file that Circle CI
reads from.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually don't think we can nicely resolve this yet
Agreed. IIRC our dependencies versions are based on what the packages version is in Ubuntu 14.04 hence scikit-image 0.9.3. More generally, getting rid of deprecation warnings and keeping compatibility with old versions are going to be at odds with each other. You could potentially complicate the example code (e.g. by adding an |
So should I just leave this as of now ?
…On Tue, Jul 31, 2018 at 8:11 AM, Loïc Estève ***@***.***> wrote:
I actually don't think we can nicely resolve this yet
Agreed. IIRC our dependencies versions are based on what the packages
version is in Ubuntu 14.04 hence scikit-image 0.9.3.
More generally, getting rid of deprecation warnings and keeping
compatibility with old versions are going to be at odds with each other.
You could potentially complicate the example code (e.g. by adding an if
clause based on the version of scikit-image in this case) but complicating
an example without a very good reason is something we try to avoid.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11670 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Aj7oQa7l4CmOP7YVOsTbd8NWjTm40VZ8ks5uMElZgaJpZM4VdPbw>
.
--
Regards,
Prathusha JS Naidu
Graduate Student
Department of CSEE
UMBC
|
This was resolved in #12654 . Closing. Thanks for contributing. |
Reference Issues/PRs
Fixes #11554
What does this implement/fix? Explain your changes.
I have changed this line
rescaled_coins = rescale(smoothened_coins, 0.2, mode="reflect")
in both the coin-segmentation examples torescaled_coins = rescale(smoothened_coins, 0.2, mode="reflect",multichannel=False,anti_aliasing=False)
The coin segmentation examples issued two warnings if:
a) "multichannel" argument is not mentioned (i.e None) in the rescale(). This argument is set to "True" only for 3D or 2D colour inputs. Since the coins image used in the example is a grayscale image I have set the argument to False.
b)"anti_aliasing" argument is not mentioned (i.e None) in the rescale(). The argument should be "True" to apply a Gaussian filter to smooth the image prior to down-scaling. Since this line
smoothened_coins = gaussian_filter(orig_coins, sigma=2)
before rescale() is already applying the filter, I have set the argument to FalseAny other comments?
This is my first ever Pull request and I have tried to follow all the guidelines. If I have still messed up anything, I would really appreciate any guidance.