Skip to content

Conversation

@alexanmv
Copy link
Contributor

making the '# ####' comment line to '# %%' type and making a header for demo path functions. Also made a header with '# %%' type for author and license. Thought also about making author and license into note style but header seemed better.

Fix issue for plot_logistic_path/PRs

For Issue [Fix notebook-style examples]
#22406
examples/linear_model/plot_logistic_path.py

What does this implement/fix? Explain your changes.

making the '# ####' comment line to '# %%' type and making a header for demo path functions. Also made a header with '# %%' type for author and license. Thought also about making author and license into note style but header seemed better.

Any other comments?

making the '# ####' comment line to '# %%' type and making a header for demo path functions. Also made a header with '# %%' type for author and license. Thought also about making author and license into note style but header seemed better.
@lesteve lesteve mentioned this pull request Feb 21, 2022
47 tasks
@lesteve lesteve added the Quick Review For PRs that are quick to review label Feb 22, 2022
@lesteve
Copy link
Member

lesteve commented Feb 22, 2022

Thanks a lot for your PR!

In my last commit I changed a few things:

  • Author and License don't need to have their own section so I put them back as comments
  • I broke the example down into more sections
  • I moved the imports closer to where they are needed, this is closer to what you would write in a notebook (even if not considered good coding style by pycodestyle)
  • remove the time.time() and print statement, they do no seem that useful (even if you run the example as a script it takes ~2s)

@lesteve lesteve changed the title Update plot_logistic_path.py DOC: use notebook-style for plot_logistic_path.py Feb 22, 2022
@lesteve lesteve merged commit 46f15a0 into scikit-learn:main Feb 22, 2022
@lesteve
Copy link
Member

lesteve commented Feb 22, 2022

Merging, thanks a lot!

@alexanmv
Copy link
Contributor Author

Merging, thanks a lot
i thank you for merging my branch and thank you for explaining the extra changes you made. They will be very useful for the next contribution.

thomasjpfan pushed a commit to thomasjpfan/scikit-learn that referenced this pull request Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Quick Review For PRs that are quick to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants