-
-
Notifications
You must be signed in to change notification settings - Fork 25.5k
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 improve documentation of copy=False in preprocessing functions #27691
Merged
lesteve
merged 11 commits into
scikit-learn:main
from
konstantinos-p:minmax_bug_fix_issue27307
Dec 7, 2023
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
deca6b8
Change the docstring of minmax_scale + add warning when X dtype not f…
konstantinos-p 4c2c4dc
Fix errors raised by black and ruff
konstantinos-p 4bcc4f0
Remove proposed warning, fix minmax_scale docstring according to Stan…
konstantinos-p 342401d
Remove spurious newline in minmax_scale
konstantinos-p 3b4ef64
:art: Some wording tweaks sklearn/preprocessing/_data.py
konstantinos-p e928bdf
Apply corrected text to scale, maxabs_scale, robust_scale, normalize,…
konstantinos-p 8776640
Change inplace in the second sentence to in place to match the phrasi…
konstantinos-p 475acda
Adapt the phrase scale, to more accurately reflect the transformation…
konstantinos-p 5fd8c70
Change the example when a copy occurs for the binarize function, fix …
konstantinos-p 02afc9f
Streamline text across all functions with single counterexample using…
konstantinos-p 8324307
lint
lesteve File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 think in this case (and maybe others) the previous wording is accurate that scipy CSR or CSC matrices are not copied, so you can not reuse the same doc here.
In general, the fact that a copy is made mostly depends on the
check_array
arguments, but the code following it may also need to be looked at closer.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 still think the previous docstring was accurate whether the new one is slightly misleading.
The code below is used, which means that it accepts CSR/CSC sparse matrix without copying it with
copy=False
: