Skip to content
Snippets Groups Projects
Commit 9785c0cb authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Rename pytools.obj_array.is_field_equal -> is_equal

parent 81533b25
No related branches found
No related tags found
No related merge requests found
Pipeline #12215 passed
......@@ -59,13 +59,17 @@ def to_obj_array(ary):
return result
def is_field_equal(a, b):
def is_equal(a, b):
if is_obj_array(a):
return is_obj_array(b) and (a.shape == b.shape) and (a == b).all()
else:
return not is_obj_array(b) and a == b
# moderately deprecated
is_field_equal = is_equal
def make_obj_array(res_list):
result = np.empty((len(res_list),), dtype=object)
for i, v in enumerate(res_list):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment