From 0625a2f61a6f63294f1e493b23e226538cfc973e Mon Sep 17 00:00:00 2001 From: Zitzeronion Date: Mon, 5 Aug 2024 10:51:44 +0200 Subject: [PATCH] np.mat error using pyMBE 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. --- src/python/espressomd/visualization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/espressomd/visualization.py b/src/python/espressomd/visualization.py index e74e6b4c82..1a2b993a03 100644 --- a/src/python/espressomd/visualization.py +++ b/src/python/espressomd/visualization.py @@ -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]])