()
| 266 | |
| 267 | |
| 268 | def test_broadcast_to_raises(): |
| 269 | data = [ |
| 270 | [(0,), ()], |
| 271 | [(1,), ()], |
| 272 | [(3,), ()], |
| 273 | [(3,), (1,)], |
| 274 | [(3,), (2,)], |
| 275 | [(3,), (4,)], |
| 276 | [(1, 2), (2, 1)], |
| 277 | [(1, 1), (1,)], |
| 278 | [(1,), -1], |
| 279 | [(1,), (-1,)], |
| 280 | [(1, 2), (-1, 2)], |
| 281 | ] |
| 282 | for orig_shape, target_shape in data: |
| 283 | arr = np.zeros(orig_shape) |
| 284 | assert_raises(ValueError, lambda: broadcast_to(arr, target_shape)) |
| 285 | |
| 286 | |
| 287 | def test_broadcast_shape(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…