Skip to content

Commit

Permalink
Rename pytools.obj_array.is_field_equal -> is_equal
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Jun 27, 2018
1 parent 81533b2 commit 9785c0c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pytools/obj_array.py
Expand Up @@ -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):
Expand Down

0 comments on commit 9785c0c

Please sign in to comment.