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
Conversation
updating 'None' option for max_patches
None
in _compute_n_patches
None
in _compute_n_patchesmax_patches=None
in _compute_n_patches
I edited the title of the PR and the summary to reflect what changes in proposed in this PR. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@Ily83 Would you be able to complete this PR? |
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Done |
sklearn/feature_extraction/image.py
Outdated
@@ -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 |
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.
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.
@Ily83 are you planning to continue working on this PR? |
there is nothing to continue here @marenwestermann |
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. :) |
I just pushed the proposed change by @betatim and merge this PR |
…earn#25999) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
…earn#25999) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
…earn#25999) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Related to #17295
Add the meaning of
max_patches=None
in the docstring of_compute_n_patches
.It makes
_compute_n_patches
docstring consistent withextract_2d_patches
also.