()
| 284 | |
| 285 | |
| 286 | def test_reduce_invalid_axes(): |
| 287 | class Batch3DInvalidAxes(Batch3D): |
| 288 | def valid_axes(self): # Invalid axes |
| 289 | return [-100, (100, 0)] |
| 290 | |
| 291 | batch_fn = Batch3DInvalidAxes(np.uint8) |
| 292 | dali_reduce_fn, numpy_reduce_fn = reduce_fns["sum"] |
| 293 | |
| 294 | for axes in batch_fn.valid_axes(): |
| 295 | with assert_raises(IndexError, glob="Axis index out of range"): |
| 296 | dali_res_cpu, dali_res_gpu = run_dali( |
| 297 | dali_reduce_fn, batch_fn, keep_dims=False, axes=axes, output_type=np.uint8 |
| 298 | ) |
| 299 | |
| 300 | |
| 301 | def test_reduce_with_promotion(): |
nothing calls this directly
no test coverage detected