mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Final changes
This commit is contained in:
parent
e79651c600
commit
d24aaa8626
1 changed files with 4 additions and 8 deletions
|
|
@ -7,18 +7,14 @@ class EqualityMixin(object):
|
|||
"""
|
||||
|
||||
def __eq__(self, other):
|
||||
eqval = True
|
||||
if isinstance(other, type(self)):
|
||||
for key, value in self.__dict__.items():
|
||||
if key in other.__dict__:
|
||||
if not np.array_equal(value, other.__dict__.get(key)):
|
||||
eqval = False
|
||||
else:
|
||||
eqval = False
|
||||
if not np.array_equal(value, other.__dict__.get(key)):
|
||||
return False
|
||||
else:
|
||||
eqval = False
|
||||
return False
|
||||
|
||||
return eqval
|
||||
return True
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self.__eq__(other)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue