(self)
| 6301 | assert_almost_equal(res, tgt, decimal=ndec) |
| 6302 | |
| 6303 | def test_var_dimensions(self): |
| 6304 | # _var paths for complex number introduce additions on views that |
| 6305 | # increase dimensions. Ensure this generalizes to higher dims |
| 6306 | mat = np.stack([self.cmat]*3) |
| 6307 | for axis in [0, 1, 2, -1, None]: |
| 6308 | msqr = _mean(mat * mat.conj(), axis=axis) |
| 6309 | mean = _mean(mat, axis=axis) |
| 6310 | tgt = msqr - mean * mean.conjugate() |
| 6311 | res = _var(mat, axis=axis) |
| 6312 | assert_almost_equal(res, tgt) |
| 6313 | |
| 6314 | def test_var_complex_byteorder(self): |
| 6315 | # Test that var fast-path does not cause failures for complex arrays |
nothing calls this directly
no test coverage detected