MCPcopy Create free account
hub / github.com/TRIQS/triqs / __init__

Method __init__

python/triqs/dos/dos.py:231–240  ·  view source on GitHub ↗
(self, function, x_min, x_max, n_pts=100, name='')

Source from the content-addressed store, hash-verified

229 Upper mesh bound.
230 """
231 def __init__(self, function, x_min, x_max, n_pts=100, name=''):
232 assert callable(function), "function is not callable"
233 self.function,self.x_min,self.x_max = function,x_min,x_max
234 try :
235 e = function(0.001)
236 len(numpy.array(e).shape) ==1
237 except :
238 raise RuntimeError("Value of the function must be a 1d-array")
239 self.__f(n_pts) # compute arrays
240 DOS.__init__(self,self.eps,self.rho,name)
241
242 #-------------------------------------------------------------
243

Callers

nothing calls this directly

Calls 2

__fMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected