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

Method test_boolean

numpy/core/tests/test_numeric.py:1629–1635  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1627
1628class TestIndex:
1629 def test_boolean(self):
1630 a = rand(3, 5, 8)
1631 V = rand(5, 8)
1632 g1 = randint(0, 5, size=15)
1633 g2 = randint(0, 8, size=15)
1634 V[g1, g2] = -V[g1, g2]
1635 assert_((np.array([a[0][V > 0], a[1][V > 0], a[2][V > 0]]) == a[:, V > 0]).all())
1636
1637 def test_boolean_edgecase(self):
1638 a = np.array([], dtype='int32')

Callers

nothing calls this directly

Calls 3

assert_Function · 0.90
randFunction · 0.85
allMethod · 0.45

Tested by

no test coverage detected