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

Method test_center

numpy/_core/tests/test_strings.py:875–879  ·  view source on GitHub ↗
(self, buf, width, fillchar, res, dt)

Source from the content-addressed store, hash-verified

873 ('abc', 10, '*', '***abc****'),
874 ])
875 def test_center(self, buf, width, fillchar, res, dt):
876 buf = np.array(buf, dtype=dt)
877 fillchar = np.array(fillchar, dtype=dt)
878 res = np.array(res, dtype=dt)
879 assert_array_equal(np.strings.center(buf, width, fillchar), res)
880
881 @pytest.mark.parametrize("buf,width,fillchar,res", [
882 ('abc', 10, ' ', 'abc '),

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
centerMethod · 0.45

Tested by

no test coverage detected