(self, x)
| 60 | self.assertTrue(np.all(precision < 3200.0)) |
| 61 | |
| 62 | def CheckUnitary(self, x): |
| 63 | # Tests that x[...,:,:]^H * x[...,:,:] is close to the identity. |
| 64 | xx = math_ops.matmul(x, x, adjoint_a=True) |
| 65 | identity = array_ops.matrix_band_part(array_ops.ones_like(xx), 0, 0) |
| 66 | precision = self.AdjustedNorm(xx.eval() - self.evaluate(identity)) |
| 67 | self.assertTrue(np.all(precision < 4800.0)) |
| 68 | |
| 69 | def _test(self, dtype, shape, full_matrices): |
| 70 | np.random.seed(1) |