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

Method test_rfind

numpy/_core/tests/test_defchararray.py:342–348  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

340 assert_array_equal(A.isupper(), [[False, False], [False, False], [False, True]])
341
342 def test_rfind(self):
343 A = self.A()
344 assert_(issubclass(A.rfind('a').dtype.type, np.integer))
345 assert_array_equal(A.rfind('a'), [[1, -1], [-1, 6], [-1, -1]])
346 assert_array_equal(A.rfind('3'), [[-1, -1], [2, -1], [6, -1]])
347 assert_array_equal(A.rfind('a', 0, 2), [[1, -1], [-1, -1], [-1, -1]])
348 assert_array_equal(A.rfind(['1', 'P']), [[-1, -1], [0, -1], [0, 2]])
349
350 def test_rindex(self):
351 A = self.A()

Callers

nothing calls this directly

Calls 4

AMethod · 0.95
assert_Function · 0.90
assert_array_equalFunction · 0.90
rfindMethod · 0.80

Tested by

no test coverage detected