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

Method test_find

numpy/core/tests/test_defchararray.py:240–245  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

238 assert_raises(TypeError, fail)
239
240 def test_find(self):
241 assert_(issubclass(self.A.find('a').dtype.type, np.integer))
242 assert_array_equal(self.A.find('a'), [[1, -1], [-1, 6], [-1, -1]])
243 assert_array_equal(self.A.find('3'), [[-1, -1], [2, -1], [2, -1]])
244 assert_array_equal(self.A.find('a', 0, 2), [[1, -1], [-1, -1], [-1, -1]])
245 assert_array_equal(self.A.find(['1', 'P']), [[-1, -1], [0, -1], [0, 1]])
246
247 def test_index(self):
248

Callers

nothing calls this directly

Calls 3

assert_Function · 0.90
assert_array_equalFunction · 0.90
findMethod · 0.80

Tested by

no test coverage detected