Skip to content

Commit

Permalink
Merge pull request #1611 from jonaslandsgesell/patch-6
Browse files Browse the repository at this point in the history
Update analyze.pyx
  • Loading branch information
fweik committed Nov 14, 2017
2 parents b1d4f42 + 154f1e8 commit 380c2cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/python/espressomd/analyze.pyx
Expand Up @@ -124,10 +124,10 @@ class Analysis(object):
"""

if id == None and pos == None:
if id is None and pos is None:
raise Exception("Either id or pos have to be specified\n" + __doc__)

if id != None and pos != None:
if (id is not None) and (pos is not None):
raise Exception("Only one of id or pos may be specified\n" + __doc__)

cdef double cpos[3]
Expand All @@ -136,7 +136,7 @@ class Analysis(object):

# Get position
# If particle id specified
if id != None:
if id is not None:
if not isinstance(id, int):
raise ValueError("Id has to be an integer")
if not id in self._system.part[:].id:
Expand Down

0 comments on commit 380c2cd

Please sign in to comment.