Skip to content

API Deprecates support for np.matrix in check_array #20165

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

Merged
merged 4 commits into from
Jun 1, 2021

Conversation

thomasjpfan
Copy link
Member

Reference Issues/PRs

Related to #10993 (comment)

What does this implement/fix? Explain your changes.

Deprecates np.matrix in check_array in 1.0.

Any other comments?

@ogrisel What is the reasoning behind linking to https://numpy.org/doc/stable/reference/generated/numpy.matrix.html ? Was it to show users the "It is no longer recommended to use this class ... " message?

Screen Shot 2021-05-29 at 10 46 34 PM

@ogrisel
Copy link
Member

ogrisel commented May 31, 2021

@ogrisel What is the reasoning behind linking to https://numpy.org/doc/stable/reference/generated/numpy.matrix.html ? Was it to show users the "It is no longer recommended to use this class ... " message?

Just that this comes from upper numpy authority :) But as you wish.

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member Author

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

@ogrisel I added the link to np.matrix in the warning message.

"np.matrix usage is deprecated in 1.0 and will raise a TypeError "
"in 1.2. Please convert to a numpy array with np.asarray. For "
"more information see: "
"https://numpy.org/doc/stable/reference/generated/numpy.matrix.html", # noqa
Copy link
Member Author

Choose a reason for hiding this comment

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

Splitting the URL into two lines would make it harder to navigate to the URL when browsing the code.

Copy link
Member

@lorentzenchr lorentzenchr left a comment

Choose a reason for hiding this comment

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

LGTM. Let's cut out old wood (the German saying is "cut out old braids" but I don't know if that translates well).

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.

3 participants