(self)
| 301 | assert_equal(np.squeeze([np.zeros((3, 1))], axis=-1).shape, (1, 3)) |
| 302 | |
| 303 | def test_std(self): |
| 304 | A = [[1, 2, 3], [4, 5, 6]] |
| 305 | assert_almost_equal(np.std(A), 1.707825127659933) |
| 306 | assert_almost_equal(np.std(A, 0), np.array([1.5, 1.5, 1.5])) |
| 307 | assert_almost_equal(np.std(A, 1), np.array([0.81649658, 0.81649658])) |
| 308 | |
| 309 | with warnings.catch_warnings(record=True) as w: |
| 310 | warnings.filterwarnings('always', '', RuntimeWarning) |
| 311 | assert_(np.isnan(np.std([]))) |
| 312 | assert_(w[0].category is RuntimeWarning) |
| 313 | |
| 314 | def test_swapaxes(self): |
| 315 | tgt = [[[0, 4], [2, 6]], [[1, 5], [3, 7]]] |
nothing calls this directly
no test coverage detected