Changeset 8105
- Timestamp:
- 02/09/10 02:59:54 (7 months ago)
- Files:
-
- 1 modified
-
branches/1.4.x/numpy/testing/utils.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.4.x/numpy/testing/utils.py
r8104 r8105 1109 1109 ref = nulp * np.spacing(np.where(ax > ay, ax, ay)) 1110 1110 if not np.all(np.abs(x-y) <= ref): 1111 max_nulp = np.max(nulp_diff(x, y)) 1112 raise AssertionError("X and Y are not equal to %d ULP "\ 1113 "(max is %g)" % (nulp, max_nulp)) 1111 if np.iscomplexobj(x) or np.iscomplexobj(y): 1112 msg = "X and Y are not equal to %d ULP" % nulp 1113 else: 1114 max_nulp = np.max(nulp_diff(x, y)) 1115 msg = "X and Y are not equal to %d ULP (max is %g)" % (nulp, max_nulp) 1116 raise AssertionError(msg) 1114 1117 1115 1118 def assert_array_max_ulp(a, b, maxulp=1, dtype=None):
