(self)
| 241 | assert_equal(np.squeeze([np.zeros((3, 1))], axis=-1).shape, (1, 3)) |
| 242 | |
| 243 | def test_std(self): |
| 244 | A = [[1, 2, 3], [4, 5, 6]] |
| 245 | assert_almost_equal(np.std(A), 1.707825127659933) |
| 246 | assert_almost_equal(np.std(A, 0), np.array([1.5, 1.5, 1.5])) |
| 247 | assert_almost_equal(np.std(A, 1), np.array([0.81649658, 0.81649658])) |
| 248 | |
| 249 | with warnings.catch_warnings(record=True) as w: |
| 250 | warnings.filterwarnings('always', '', RuntimeWarning) |
| 251 | assert_(np.isnan(np.std([]))) |
| 252 | assert_(w[0].category is RuntimeWarning) |
| 253 | |
| 254 | def test_swapaxes(self): |
| 255 | tgt = [[[0, 4], [2, 6]], [[1, 5], [3, 7]]] |
nothing calls this directly
no test coverage detected