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

Method test_index

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

Source from the content-addressed store, hash-verified

245 assert_array_equal(self.A.find(['1', 'P']), [[-1, -1], [0, -1], [0, 1]])
246
247 def test_index(self):
248
249 def fail():
250 self.A.index('a')
251
252 assert_raises(ValueError, fail)
253 assert_(np.char.index('abcba', 'b') == 1)
254 assert_(issubclass(np.char.index('abcba', 'b').dtype.type, np.integer))
255
256 def test_isalnum(self):
257 assert_(issubclass(self.A.isalnum().dtype.type, np.bool_))

Callers

nothing calls this directly

Calls 3

assert_raisesFunction · 0.90
assert_Function · 0.90
indexMethod · 0.45

Tested by

no test coverage detected