(arr1, arr2, rtol=1e-05, atol=1e-08, decode_bytes=True)
| 42 | |
| 43 | |
| 44 | def _data_allclose_or_equiv(arr1, arr2, rtol=1e-05, atol=1e-08, decode_bytes=True): |
| 45 | if any(arr.dtype.kind == "S" for arr in [arr1, arr2]) and decode_bytes: |
| 46 | arr1 = _decode_string_data(arr1) |
| 47 | arr2 = _decode_string_data(arr2) |
| 48 | exact_dtypes = ["M", "m", "O", "S", "U", "T"] |
| 49 | if any(arr.dtype.kind in exact_dtypes for arr in [arr1, arr2]): |
| 50 | return duck_array_ops.array_equiv(arr1, arr2) |
| 51 | else: |
| 52 | return duck_array_ops.allclose_or_equiv(arr1, arr2, rtol=rtol, atol=atol) |
| 53 | |
| 54 | |
| 55 | @ensure_warnings |
nothing calls this directly
no test coverage detected
searching dependent graphs…