(self)
| 7183 | assert_equal(f(A, axis=axis), np.zeros([])) |
| 7184 | |
| 7185 | def test_mean_values(self): |
| 7186 | rmat, cmat, omat = self._create_data() |
| 7187 | for mat in [rmat, cmat, omat]: |
| 7188 | for axis in [0, 1]: |
| 7189 | tgt = mat.sum(axis=axis) |
| 7190 | res = _mean(mat, axis=axis) * mat.shape[axis] |
| 7191 | assert_almost_equal(res, tgt) |
| 7192 | for axis in [None]: |
| 7193 | tgt = mat.sum(axis=axis) |
| 7194 | res = _mean(mat, axis=axis) * np.prod(mat.shape) |
| 7195 | assert_almost_equal(res, tgt) |
| 7196 | |
| 7197 | def test_mean_float16(self): |
| 7198 | # This fail if the sum inside mean is done in float16 instead |
nothing calls this directly
no test coverage detected