MCPcopy Index your code
hub / github.com/numpy/numpy / test_both

Method test_both

numpy/lib/tests/test_function_base.py:1567–1574  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1565 assert_array_equal(a, ['12', '9'])
1566
1567 def test_both(self):
1568 a = rand(10)
1569 mask = a > 0.5
1570 ac = a.copy()
1571 c = extract(mask, a)
1572 place(a, mask, 0)
1573 place(a, mask, c)
1574 assert_array_equal(a, ac)
1575
1576
1577# _foo1 and _foo2 are used in some tests in TestVectorize.

Callers

nothing calls this directly

Calls 5

extractFunction · 0.90
placeFunction · 0.90
assert_array_equalFunction · 0.90
randFunction · 0.85
copyMethod · 0.45

Tested by

no test coverage detected