Skip to content

Commit

Permalink
fix bug that turned off metadata check, check SparseInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
jlippuner committed Jun 1, 2021
1 parent 790c320 commit f19c805
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ def compare_attribute_group(f0, f1, name):
else:
print(' %20s: no diffs' % name)

return got_diffs


def compare_metadata(f0, f1, quiet=False, one=False, tol=1.0e-12):
""" compares metadata of two hdf files f0 and f1. Returns 0 if the files are equivalent.
Expand Down Expand Up @@ -217,7 +219,7 @@ def compare_metadata(f0, f1, quiet=False, one=False, tol=1.0e-12):
if not quiet: print("")
else:
print(' %18s/%s: no diffs'%(var,key))
if var in ['LogicalLocations', 'Levels']:
if var in ['LogicalLocations', 'Levels', 'SparseInfo']:
#Compare raw data of these variables
val0 = np.array(f0.fid[var])
val1 = np.array(f1.fid[var])
Expand Down

0 comments on commit f19c805

Please sign in to comment.