-
Notifications
You must be signed in to change notification settings - Fork 69
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
Use of numpy.matrix not recommended #93
Comments
Ah, OK, I did not realize this. It seems to me that using the |
Hmm, using the |
Has anyone been able to find a workaround for this issue? |
I found that The NumPy documentation does not contain the warning about future use: |
That should not be the case as you still work with the matrix class, while you are encouraged not to, as the class may be removed in the future:
I so guess the documentation could be improved. From the source: @set_module('numpy')
def asmatrix(data, dtype=None):
"""
<docs left out for brevity>
"""
return matrix(data, dtype=dtype, copy=False) |
@akeeman you are absolutely right |
Sorry, haven't had a chance to dig into this. |
For future similar questions, I'm using this workaround:
|
This sounds like it should be the right thing to do. |
The use of
numpy.matrix
is discuraged since numpy 1.15From the docs(1.15 / stable):
Using regular arrays gives some problems, like in the first example:
The text was updated successfully, but these errors were encountered: