Skip to content

Commit

Permalink
Merge pull request #37 from ChristopherMayes/deprecated_np_complex
Browse files Browse the repository at this point in the history
np.complex is deprecated.
  • Loading branch information
ChristopherMayes authored Jun 28, 2023
2 parents 20559fd + f5aaa55 commit a1d6c9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pmd_beamphysics/interfaces/superfish.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ def read_superfish_t7(filename,
#labels=['Ez', 'Er', 'E', 'Hphi']
dat = dat.reshape(nr, 1, nz, 4)

components['electricField/z'] = dat[:,:,:,0].astype(np.complex) * 1e6 # MV/m -> V/m
components['electricField/r'] = dat[:,:,:,1].astype(np.complex) * 1e6 # MV/m -> V/m
components['electricField/z'] = dat[:,:,:,0].astype(complex) * 1e6 # MV/m -> V/m
components['electricField/r'] = dat[:,:,:,1].astype(complex) * 1e6 # MV/m -> V/m
components['magneticField/theta'] = dat[:,:,:,3] * -1j*mu_0 # A/m -> T

else:
Expand Down

0 comments on commit a1d6c9e

Please sign in to comment.