From f7171acc1b3d1e1bb4ddacbd6844feea8e2c686c Mon Sep 17 00:00:00 2001 From: Stephan Kuschel Date: Mon, 8 Jul 2024 23:52:17 +0200 Subject: [PATCH] dont use np.asfarray it has been removed in numpy 2.0 --- postpic/datareader/dummy.py | 2 +- postpic/helper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/postpic/datareader/dummy.py b/postpic/datareader/dummy.py index c2789b06..61a91e65 100644 --- a/postpic/datareader/dummy.py +++ b/postpic/datareader/dummy.py @@ -132,7 +132,7 @@ def simgridpoints(self, axis): def simextent(self, axis): g = self.grid(None, axis) - return np.asfarray([g[0], g[-1]]) + return np.asarray([g[0], g[-1]], dtype=np.float64) def gridnode(self, key, axis): ''' diff --git a/postpic/helper.py b/postpic/helper.py index d7df84d6..aa5141fb 100644 --- a/postpic/helper.py +++ b/postpic/helper.py @@ -1039,7 +1039,7 @@ def _kspace_propagate_generator(kspace, dt, moving_window_vect=None, raise ValueError("Argument moving_window_vect has the wrong length. " "Please make sure that len(moving_window_vect) == kspace.dimensions.") - moving_window_vect = np.asfarray(moving_window_vect) + moving_window_vect = np.asarray(moving_window_vect, dtype=np.float64) moving_window_vect /= npl.norm(moving_window_vect) moving_window_dict = dict(enumerate([dz*x for x in moving_window_vect]))