Skip to content

Commit fbcc3a9

Browse files
committed
Update comparator.py
1 parent 937404f commit fbcc3a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

codeflash/verification/comparator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ def comparator(orig: Any, new: Any, superset_obj=False) -> bool:
149149
return orig == new
150150

151151
if HAS_NUMPY and isinstance(orig, np.void):
152-
return orig == new
152+
if orig.dtype != new.dtype:
153+
return False
154+
return all(comparator(orig[field], new[field], superset_obj) for field in orig.dtype.fields)
153155

154156
if HAS_SCIPY and isinstance(orig, scipy.sparse.spmatrix):
155157
if orig.dtype != new.dtype:

0 commit comments

Comments
 (0)