()
| 258 | |
| 259 | |
| 260 | def test_broadcast_to_raises(): |
| 261 | data = [ |
| 262 | [(0,), ()], |
| 263 | [(1,), ()], |
| 264 | [(3,), ()], |
| 265 | [(3,), (1,)], |
| 266 | [(3,), (2,)], |
| 267 | [(3,), (4,)], |
| 268 | [(1, 2), (2, 1)], |
| 269 | [(1, 1), (1,)], |
| 270 | [(1,), -1], |
| 271 | [(1,), (-1,)], |
| 272 | [(1, 2), (-1, 2)], |
| 273 | ] |
| 274 | for orig_shape, target_shape in data: |
| 275 | arr = np.zeros(orig_shape) |
| 276 | assert_raises(ValueError, lambda: broadcast_to(arr, target_shape)) |
| 277 | |
| 278 | |
| 279 | def test_broadcast_shape(): |
nothing calls this directly
no test coverage detected