()
| 3021 | np.array([T(), T()], dtype='O')) |
| 3022 | |
| 3023 | def test_object_iter_cleanup_reduce(): |
| 3024 | # Similar as above, but a complex reduction case that was previously |
| 3025 | # missed (see gh-18810). |
| 3026 | # The following array is special in that it cannot be flattened: |
| 3027 | arr = np.array([[None, 1], [-1, -1], [None, 2], [-1, -1]])[::2] |
| 3028 | with pytest.raises(TypeError): |
| 3029 | np.sum(arr) |
| 3030 | |
| 3031 | @pytest.mark.parametrize("arr", [ |
| 3032 | np.ones((8000, 4, 2), dtype=object)[:, ::2, :], |