Sum x, returning a 0d array of the same class
(x)
| 159 | |
| 160 | def test_0d_array(self, cls=np.ndarray): |
| 161 | def sum_to_0d(x): |
| 162 | """ Sum x, returning a 0d array of the same class """ |
| 163 | assert_equal(x.ndim, 1) |
| 164 | return np.squeeze(np.sum(x, keepdims=True)) |
| 165 | a = np.ones((6, 3)).view(cls) |
| 166 | res = apply_along_axis(sum_to_0d, 0, a) |
| 167 | assert_(isinstance(res, cls)) |
nothing calls this directly
no test coverage detected