Skip to content

Commit 6794c3d

Browse files
committed
Return bool from SymOp.is_identity.
1 parent f24ba3e commit 6794c3d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/diffpy/Structure/spacegroupmod.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,11 @@ def is_identity(self):
137137
"""Returns True if this SymOp is an identity symmetry operation
138138
(no rotation, no translation), otherwise returns False.
139139
"""
140-
if numpy.allclose(self.R, numpy.identity(3, float)) and \
141-
numpy.allclose(self.t, numpy.zeros(3, float)):
142-
return True
140+
rv = (numpy.allclose(self.R, numpy.identity(3, float)) and
141+
numpy.allclose(self.t, numpy.zeros(3, float)))
142+
return rv
143+
144+
# End of class SymOp
143145

144146

145147
class SpaceGroup(object):
@@ -191,6 +193,8 @@ def iter_equivalent_positions(self, vec):
191193
"""
192194
for symop in self.symop_list:
193195
yield symop(vec)
196+
pass
194197

198+
# End of class SpaceGroup
195199

196200
# End of file

0 commit comments

Comments
 (0)