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

DOC add meaning of max_patches=None in _compute_n_patches #25999

Merged
merged 4 commits into from Jun 26, 2023

Conversation

Ily83
Copy link
Contributor

@Ily83 Ily83 commented Mar 28, 2023

Related to #17295

Add the meaning of max_patches=None in the docstring of _compute_n_patches.
It makes _compute_n_patches docstring consistent with extract_2d_patches also.

updating 'None' option for max_patches
@glemaitre glemaitre changed the title Update image.py DOC make _compute_n_patches docstring consistent with extract_2d_patches Mar 29, 2023
@glemaitre glemaitre changed the title DOC make _compute_n_patches docstring consistent with extract_2d_patches DOC add meaning of None in _compute_n_patches Mar 29, 2023
@glemaitre glemaitre changed the title DOC add meaning of None in _compute_n_patches DOC add meaning of max_patches=None in _compute_n_patches Mar 29, 2023
@glemaitre
Copy link
Member

I edited the title of the PR and the summary to reflect what changes in proposed in this PR.
It is a good practice to bring some information.

@Aryan-Mishra24

This comment was marked as off-topic.

@glemaitre
Copy link
Member

@Ily83 Would you be able to complete this PR?

Ily83 and others added 2 commits April 4, 2023 23:40
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
@Ily83
Copy link
Contributor Author

Ily83 commented Apr 4, 2023

Done

@@ -261,8 +261,8 @@ def _compute_n_patches(i_h, i_w, p_h, p_w, max_patches=None):
max_patches : int or float, default=None
The maximum number of patches to extract. If max_patches is a float
between 0 and 1, it is taken to be a proportion of the total number
of patches.
If max_patches=None then the total number of patches will be extracted.
of patches. If `max_patches` is None it corresponds to the total number
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I can't really explain why but I think I prefer "If max_patches is None all possible patches are extracted.". I find "total number of patches" a bit weird.

@marenwestermann
Copy link
Member

@Ily83 are you planning to continue working on this PR?

@Ily83
Copy link
Contributor Author

Ily83 commented Jun 22, 2023

@Ily83 are you planning to continue working on this PR?

there is nothing to continue here @marenwestermann

@marenwestermann
Copy link
Member

There's one more change request from a core developer that would need to be addressed. Once this is done, I think this PR can be merged. :)

@glemaitre glemaitre self-requested a review June 26, 2023 08:58
@github-actions
Copy link

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 155cdc7. Link to the linter CI: here

@glemaitre glemaitre merged commit a65b16c into scikit-learn:main Jun 26, 2023
11 of 18 checks passed
@glemaitre
Copy link
Member

I just pushed the proposed change by @betatim and merge this PR

@glemaitre glemaitre removed their request for review June 26, 2023 09:16
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jun 29, 2023
…earn#25999)

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
jeremiedbb pushed a commit that referenced this pull request Jun 29, 2023
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
punndcoder28 pushed a commit to punndcoder28/scikit-learn that referenced this pull request Jul 29, 2023
…earn#25999)

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
REDVM pushed a commit to REDVM/scikit-learn that referenced this pull request Nov 16, 2023
…earn#25999)

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants