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

Method test_boolean

numpy/_core/tests/test_numeric.py:2009–2017  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2007
2008class TestIndex:
2009 def test_boolean(self):
2010 a = rand(3, 5, 8)
2011 V = rand(5, 8)
2012 g1 = randint(0, 5, size=15)
2013 g2 = randint(0, 8, size=15)
2014 V[g1, g2] = -V[g1, g2]
2015 assert_(
2016 (np.array([a[0][V > 0], a[1][V > 0], a[2][V > 0]]) == a[:, V > 0]).all()
2017 )
2018
2019 def test_boolean_edgecase(self):
2020 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