From f36e6277d505183908af1ef3a976d9fd879f30fc Mon Sep 17 00:00:00 2001 From: Priyanka Seth Date: Mon, 10 Nov 2014 10:49:27 +0100 Subject: [PATCH] Replaced "== None" with "is None" for other py files --- python/sumk_lda.py | 4 ++-- python/trans_basis.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/sumk_lda.py b/python/sumk_lda.py index ffa0f213..63b60e35 100644 --- a/python/sumk_lda.py +++ b/python/sumk_lda.py @@ -250,7 +250,7 @@ class SumkLDA: # Do we need to set up G_upfold? set_up_G_upfold = False # assume not - if self.G_upfold == None: # yes if not G_upfold provided + if self.G_upfold is None: # yes if not G_upfold provided set_up_G_upfold = True else: # yes if inconsistencies present in existing G_upfold GFsize = [ gf.N1 for sig,gf in self.G_upfold] @@ -403,7 +403,7 @@ class SumkLDA: def analyse_BS(self, threshold = 0.00001, include_shells = None, dm = None): """ Determines the Green function block structure from simple point integration.""" - if (dm==None): dm = self.simple_point_dens_mat() + if dm is None: dm = self.simple_point_dens_mat() dens_mat = [dm[self.invshellmap[ish]] for ish in xrange(self.n_inequiv_corr_shells) ] diff --git a/python/trans_basis.py b/python/trans_basis.py index 2a255350..65db7942 100644 --- a/python/trans_basis.py +++ b/python/trans_basis.py @@ -14,9 +14,9 @@ class TransBasis: def __init__(self, SK=None, hdf_datafile=None): '''Inits the class by reading the input.''' - if (SK==None): + if SK is None: # build our own SK instance - if (hdf_datafile==None): + if hdf_datafile is None: mpi.report("Give SK instance or HDF filename!") return 0