(self, a)
| 2312 | self.assertTrue(self._NDArrayNear(ndarray1, ndarray2, err), msg=msg) |
| 2313 | |
| 2314 | def _GetNdArray(self, a): |
| 2315 | # If a is a tensor then convert it to ndarray |
| 2316 | if isinstance(a, ops.Tensor): |
| 2317 | if isinstance(a, ops._EagerTensorBase): |
| 2318 | a = a.numpy() |
| 2319 | else: |
| 2320 | a = self.evaluate(a) |
| 2321 | if not isinstance(a, np.ndarray): |
| 2322 | return np.array(a) |
| 2323 | return a |
| 2324 | |
| 2325 | def _assertArrayLikeAllClose(self, a, b, rtol=1e-6, atol=1e-6, msg=None): |
| 2326 | a = self._GetNdArray(a) |
no test coverage detected