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

Method test_rfind

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

Source from the content-addressed store, hash-verified

282 assert_array_equal(self.A.isupper(), [[False, False], [False, False], [False, True]])
283
284 def test_rfind(self):
285 assert_(issubclass(self.A.rfind('a').dtype.type, np.integer))
286 assert_array_equal(self.A.rfind('a'), [[1, -1], [-1, 6], [-1, -1]])
287 assert_array_equal(self.A.rfind('3'), [[-1, -1], [2, -1], [6, -1]])
288 assert_array_equal(self.A.rfind('a', 0, 2), [[1, -1], [-1, -1], [-1, -1]])
289 assert_array_equal(self.A.rfind(['1', 'P']), [[-1, -1], [0, -1], [0, 2]])
290
291 def test_rindex(self):
292

Callers

nothing calls this directly

Calls 3

assert_Function · 0.90
assert_array_equalFunction · 0.90
rfindMethod · 0.80

Tested by

no test coverage detected