-
-
Notifications
You must be signed in to change notification settings - Fork 26k
DOC Add note about that numpy.matrix is not supported (Fixes: #10993) #20157
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
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.
Thanks @yoh1496 for your pull request. I have some minor comments.
sklearn/cluster/_spectral.py
Outdated
https://numpy.org/doc/stable/reference/generated/numpy.matrix.html | ||
for details. |
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 believe this is just a matter of taste, but you might want to use a Sphinx external link in this case.
Something like
See `numpy matrix documentation <https://numpy.org/doc/stable/reference/generated/numpy.matrix.html>`_
sklearn/cluster/_spectral.py
Outdated
|
||
def __init__(self, n_clusters=8, *, eigen_solver=None, n_components=None, |
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.
In general it is a good idea not to add changes unrelated with the pull request: this is confusing when years after we check the commit history.
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.
Thank you for pointing out, and sorry about this.
This is made by formatter, so I'll disable and modify this.
Also note that the failing check is unrelated with your pull request. |
Thank you for reviewing. I modified codes. Could you review again? |
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.
Thanks @yoh1496! The rendering looks good, also.
Now, an approval by a core developer is needed before merging.
I don't think we should add such a note as part of the docstring because this would be valid for any scikit-learn estimators and we don't want to make all the docstring of all the methods of all scikit-learn estimator that verbose. Instead, I propose 2.5 things to move forward (should be addressed in distinct PRs):
|
Let's close this. Please feel free to open a new PR to address one of the first two items. Personally I would be in favor of the second solution: just raise |
Reference Issues/PRs
Fixes #10993. See also #11070.
What does this implement/fix? Explain your changes.
I added note about
numpy.matrix
is not supported because numpy does not recommend to use.Any other comments?
Please see #11070 to read discussion about this.