Skip to content

Commit

Permalink
np.mat error using pyMBE (#4971)
Browse files Browse the repository at this point in the history
Description of changes:
- replace deprecated `np.mat()` by `np.asmatrix()` 
   -  `np.mat()` was removed in NumPy 2.0
  • Loading branch information
kodiakhq[bot] authored Aug 5, 2024
2 parents 2b7c8f2 + 0625a2f commit ba9d2f0
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 ba9d2f0

Please sign in to comment.