Skip to content

Commit

Permalink
np.mat error using pyMBE
Browse files Browse the repository at this point in the history
While running the pyMBE [tutorial](https://github.com/pyMBE-dev/pyMBE/blob/main/tutorials/pyMBE_tutorial.ipynb) the notebook notified me that `np.mat()` is depreciated in numpy and replaced by `np.asmatrix()`. Short check of the numpy 2.0 docs didn't show a `np.mat()` function anymore.
  • Loading branch information
Zitzeronion authored Aug 5, 2024
1 parent 2b7c8f2 commit 0625a2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/python/espressomd/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -2887,6 +2887,6 @@ def update_modelview(self):

self.modelview = trans.dot(rotate_cam.dot(trans_cam))

c_xyz = -1 * np.mat(self.modelview[:3, :3]) * \
np.mat(self.modelview[3, :3]).T
c_xyz = -1 * np.asmatrix(self.modelview[:3, :3]) * \
np.asmatrix(self.modelview[3, :3]).T
self.cam_pos = np.array([c_xyz[0, 0], c_xyz[1, 0], c_xyz[2, 0]])

0 comments on commit 0625a2f

Please sign in to comment.