follow Python style guidelines

This commit is contained in:
Axel Kohlmeyer
2021-10-26 14:17:31 -04:00
parent 3044923cbf
commit fe9dfc6095

View File

@ -1389,7 +1389,7 @@ class lammps(object):
:return: number of atoms created. 0 if insufficient or invalid data :return: number of atoms created. 0 if insufficient or invalid data
:rtype: int :rtype: int
""" """
if id != None: if id is not None:
id_lmp = (self.c_tagint*n)() id_lmp = (self.c_tagint*n)()
try: try:
id_lmp[:] = id[0:n] id_lmp[:] = id[0:n]
@ -1411,7 +1411,7 @@ class lammps(object):
except ValueError: except ValueError:
return 0 return 0
if v != None: if v is not None:
v_lmp = (c_double*(three_n))() v_lmp = (c_double*(three_n))()
try: try:
v_lmp[:] = v[0:three_n] v_lmp[:] = v[0:three_n]
@ -1420,7 +1420,7 @@ class lammps(object):
else: else:
v_lmp = None v_lmp = None
if image != None: if image is not None:
img_lmp = (self.c_imageint*n)() img_lmp = (self.c_imageint*n)()
try: try:
img_lmp[:] = image[0:n] img_lmp[:] = image[0:n]