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

Method test_object_array_accumulate_failure

numpy/core/tests/test_ufunc.py:1426–1432  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1424 )
1425
1426 def test_object_array_accumulate_failure(self):
1427 # Typical accumulation on object works as expected:
1428 res = np.add.accumulate(np.array([1, 0, 2], dtype=object))
1429 assert_array_equal(res, np.array([1, 1, 3], dtype=object))
1430 # But errors are propagated from the inner-loop if they occur:
1431 with pytest.raises(TypeError):
1432 np.add.accumulate([1, None, 2])
1433
1434 def test_object_array_reduceat_inplace(self):
1435 # Checks that in-place reduceats work, see also gh-7465

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
accumulateMethod · 0.80

Tested by

no test coverage detected