diff --git a/Src/datToVTP.py b/Src/datToVTP.py index d505793..8a01396 100644 --- a/Src/datToVTP.py +++ b/Src/datToVTP.py @@ -62,7 +62,7 @@ def ReadNodes(Nnodes,Nscalars,varnames,f): for i in range(Nnodes): line = f.readline().strip(' \n') d = line.split(' ') - d = [ x for x in d if x is not '' ] + d = [ x for x in d if x != '' ] Nscalars_this = len(d) - 3 if Nscalars != Nscalars_this: print('Number of scalars inconsistent across points '+str(Nscalars)+' vs '+str(Nscalars_this)) diff --git a/Src/datToView.py b/Src/datToView.py index d4e14ce..ef578f8 100644 --- a/Src/datToView.py +++ b/Src/datToView.py @@ -62,7 +62,7 @@ def ReadNodes(Nnodes,Nscalars,varnames,f): for i in range(Nnodes): line = f.readline().strip(' \n') d = line.split(' ') - d = [ x for x in d if x is not '' ] + d = [ x for x in d if x != '' ] Nscalars_this = len(d) - 3 if Nscalars != Nscalars_this: print('Number of scalars inconsistent across points '+str(Nscalars)+' vs '+str(Nscalars_this))