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

Method test_both

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

Source from the content-addressed store, hash-verified

1346 assert_array_equal(a, ['12', '9'])
1347
1348 def test_both(self):
1349 a = rand(10)
1350 mask = a > 0.5
1351 ac = a.copy()
1352 c = extract(mask, a)
1353 place(a, mask, 0)
1354 place(a, mask, c)
1355 assert_array_equal(a, ac)
1356
1357
1358# _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