Skip to content
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

np.matrix PendingDeprecationWarning when running Python 3.7.3 #3

Open
PeterKanderholm opened this issue Jul 1, 2019 · 1 comment
Open
Assignees

Comments

@PeterKanderholm
Copy link

When running calfem on python 3.7.3 I get a deprecation warning for the use of np.matrix

in \calfem\core.py
M=np.ravel(C.I*(Gnp.asmatrix(ed).T-np.matrix([0., 0., 0., -qxL2/(2EA), qyL4/(24EI), qyL**3/(6*EI)]).T))
A=np.matrix([M[0],M[3]]).T
B=np.matrix([M[1],M[2],M[4],M[5]]).T

C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\calfem\core.py:361:
PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.

@jonaslindemann
Copy link
Contributor

Apparently NumPy wants to deprecate the matrix-class for good reasons. We will try to update calfem in the coming releases. However, there is currently a lot of code using np.matrix...

Jonas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants