Maintenance will be performed on git.ligo.org, chat.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 26 May 2020 starting at approximately 10am CDT. It is expected to take around 30 minutes and will involve a short period of downtime, around 5 minutes, towards the end of the maintenance period. Please address any questions, comments, or concerns to uwm-help@cgca.uwm.edu.

Commit 2ade3590 authored by Phil Jones's avatar Phil Jones

Change error message on large relative difference.

`test.py` now prints the row with the largest relative difference,
rather than the first one with a difference > diff_rel_eps.
parent 88452d24
......@@ -160,10 +160,11 @@ def diff(katfile,finesse3=False):
diffFound = True
print("Difference larger than " + str(diff_rel_eps))
# store the rows which are different
ix = np.where(rel_diff >= diff_rel_eps)[0][0]
print('Refernce Array: '+str(ref_arr[ix]))
# Print the row with the largest difference
ix = np.unravel_index(np.argmax(rel_diff), rel_diff.shape)[0]
print('Reference Array: '+str(ref_arr[ix]))
print('Output Array: '+str(out_arr[ix]))
print('Max relative difference: '+str(np.max(rel_diff)))
raise DiffException("Difference larger than " + str(diff_rel_eps), katfile)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment