Skip to content

Commit

Permalink
[python] Updated Python np.complex_ to np.complex128
Browse files Browse the repository at this point in the history
  • Loading branch information
donrolih authored and Wentzell committed Sep 10, 2024
1 parent 83bc6d9 commit deab7ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/nrgljubljana_interface/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __str__(self): return "SemiCircular(%s, %s)"%self.half_bandwidth, chem_poten
def __call__(self,G):
D = self.half_bandwidth
mu = self.chem_potential
Id = complex(1,0) if len(G.target_shape) == 0 else numpy.identity(G.target_shape[0],numpy.complex_)
Id = complex(1,0) if len(G.target_shape) == 0 else numpy.identity(G.target_shape[0],numpy.complex128)
from cmath import sqrt
if type(G.mesh) == MeshImFreq:
def f(om_):
Expand Down Expand Up @@ -78,7 +78,7 @@ def __str__(self): return "Flat(%s)"%self.half_bandwidth
def __call__(self,G):

D = self.half_bandwidth
Id = 1. if len(G.target_shape) == 0 else numpy.identity(G.target_shape[0], numpy.complex_)
Id = 1. if len(G.target_shape) == 0 else numpy.identity(G.target_shape[0], numpy.complex128)

if type(G.mesh) == MeshImFreq:
f = lambda om: (-1/(2.0*D)) * numpy.log(numpy.divide(om-D,om+D)) * Id
Expand Down

0 comments on commit deab7ff

Please sign in to comment.