(self)
| 540 | + ['01234ABCDE6789' + '0123456789' * 2])) |
| 541 | |
| 542 | def test_replace_broadcasting(self): |
| 543 | a = np.array('0,0,0').view(np.char.chararray) |
| 544 | r1 = a.replace('0', '1', count=np.arange(3)) |
| 545 | assert r1.dtype == a.dtype |
| 546 | assert_array_equal(r1, np.array(['0,0,0', '1,0,0', '1,1,0'])) |
| 547 | r2 = a.replace('0', [['1'], ['2']], count=np.arange(1, 4)) |
| 548 | assert_array_equal(r2, np.array([['1,0,0', '1,1,0', '1,1,1'], |
| 549 | ['2,0,0', '2,2,0', '2,2,2']])) |
| 550 | r3 = a.replace(['0', '0,0', '0,0,0'], 'X') |
| 551 | assert_array_equal(r3, np.array(['X,X,X', 'X,0', 'X'])) |
| 552 | |
| 553 | def test_rjust(self): |
| 554 | A = self.A() |
nothing calls this directly
no test coverage detected