Verify all inf values match in the two arrays
(x, y, infs_mask)
| 806 | return y_id |
| 807 | |
| 808 | def assert_same_inf_values(x, y, infs_mask): |
| 809 | """ |
| 810 | Verify all inf values match in the two arrays |
| 811 | """ |
| 812 | __tracebackhide__ = True # Hide traceback for py.test |
| 813 | |
| 814 | if not infs_mask.any(): |
| 815 | return |
| 816 | if x.ndim > 0 and y.ndim > 0: |
| 817 | x = x[infs_mask] |
| 818 | y = y[infs_mask] |
| 819 | else: |
| 820 | assert infs_mask.all() |
| 821 | |
| 822 | if robust_any_difference(x, y): |
| 823 | msg = build_err_msg( |
| 824 | [x, y], |
| 825 | err_msg + '\ninf values mismatch:', |
| 826 | verbose=verbose, header=header, |
| 827 | names=names, |
| 828 | precision=precision) |
| 829 | raise AssertionError(msg) |
| 830 | |
| 831 | try: |
| 832 | if strict: |
no test coverage detected
searching dependent graphs…