Skip to content

Commit

Permalink
dont use np.asfarray
Browse files Browse the repository at this point in the history
it has been removed in numpy 2.0
  • Loading branch information
skuschel committed Jul 8, 2024
1 parent b5bbb92 commit f7171ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion postpic/datareader/dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
'''
Expand Down
2 changes: 1 addition & 1 deletion postpic/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]))

Expand Down

0 comments on commit f7171ac

Please sign in to comment.