(self)
| 168 | assert_array_equal(result, expected) |
| 169 | |
| 170 | def test_subclass(self): |
| 171 | class MinimalSubclass(np.ndarray): |
| 172 | data = 1 |
| 173 | |
| 174 | def minimal_function(array): |
| 175 | return array.data |
| 176 | |
| 177 | a = np.zeros((6, 3)).view(MinimalSubclass) |
| 178 | |
| 179 | assert_array_equal( |
| 180 | apply_along_axis(minimal_function, 0, a), np.array([1, 1, 1]) |
| 181 | ) |
| 182 | |
| 183 | def test_scalar_array(self, cls=np.ndarray): |
| 184 | a = np.ones((6, 3)).view(cls) |
nothing calls this directly
no test coverage detected