MCPcopy Create free account
hub / github.com/numpy/numpy / test_object_iter_cleanup_reduce

Function test_object_iter_cleanup_reduce

numpy/core/tests/test_nditer.py:3023–3029  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3021 np.array([T(), T()], dtype='O'))
3022
3023def 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, :],

Callers

nothing calls this directly

Calls 1

sumMethod · 0.45

Tested by

no test coverage detected