Skip to content

Commit

Permalink
More informative migration error
Browse files Browse the repository at this point in the history
  • Loading branch information
thalassemia committed Dec 5, 2023
1 parent 07cdb8d commit a1472a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions migration/migration_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,9 @@ def recursive_compare(d1, d2, level='root', include_callable=False,
elif isinstance(d1, np.ndarray) or isinstance(d2, np.ndarray):
try:
np.testing.assert_array_almost_equal_nulp(d1, d2)
except AssertionError:
print('{:<20} {} != {}'.format(level, d1, d2))
except AssertionError as e:
print('{:<20} {} != {}'.format(level, np.array(d1), np.array(d2)))
print(e)
return False
except TypeError:
if not np.array_equal(d1, d2):
Expand Down

0 comments on commit a1472a7

Please sign in to comment.