The following four bugs were discovered using pylint.
self.frequencies and self.monitor should be initialized to None.
|
class EigenmodeCoefficient(ObjectiveQuantitiy): |
|
def __init__(self,sim,volume,mode,forward=True,kpoint_func=None,**kwargs): |
|
''' |
|
''' |
|
self.sim = sim |
|
self.volume=volume |
|
self.mode=mode |
|
self.forward = 0 if forward else 1 |
|
self.normal_direction = None |
|
self.kpoint_func = kpoint_func |
|
self.eval = None |
|
self.EigenMode_kwargs = kwargs |
|
return |
same for:
|
class FourierFields(ObjectiveQuantitiy): |
|
def __init__(self,sim,volume, component): |
|
self.sim = sim |
|
self.volume=volume |
|
self.eval = None |
|
self.component = component |
and:
|
class Near2FarFields(ObjectiveQuantitiy): |
|
def __init__(self,sim,Near2FarRegions, far_pt): |
|
self.sim = sim |
|
self.Near2FarRegions=Near2FarRegions |
|
self.eval = None |
|
self.far_pt = far_pt |
|
return |
== should be replaced with =:
|
k0 == direction_scalar * mp.Vector3(z=1) |
- There are two
return statements rather than one:
|
return np.exp(-1j*2*np.pi*f0*t) |
|
return np.where(n.any() < 0.0 or n.any() > self.N,0,np.exp(-1j*2*np.pi*f0*t)) |
eta is not defined:
|
case1 = eta*npa.exp(-beta*(eta-x)/eta) - (eta-x)*npa.exp(-beta) |
|
case2 = 1 - (1-eta)*npa.exp(-beta*(x-eta)/(1-eta)) - (eta-x)*npa.exp(-beta) |
The following four bugs were discovered using pylint.
self.frequenciesandself.monitorshould be initialized toNone.meep/python/adjoint/objective.py
Lines 26 to 38 in 41548a3
same for:
meep/python/adjoint/objective.py
Lines 113 to 118 in 41548a3
and:
meep/python/adjoint/objective.py
Lines 170 to 176 in 41548a3
==should be replaced with=:meep/python/adjoint/objective.py
Line 61 in 41548a3
returnstatements rather than one:meep/python/adjoint/filter_source.py
Lines 56 to 57 in 41548a3
etais not defined:meep/python/adjoint/filters.py
Lines 607 to 608 in 41548a3