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

Method test_basic

numpy/lib/tests/test_shape_base.py:755–764  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

753
754class TestTile:
755 def test_basic(self):
756 a = np.array([0, 1, 2])
757 b = [[1, 2], [3, 4]]
758 assert_equal(tile(a, 2), [0, 1, 2, 0, 1, 2])
759 assert_equal(tile(a, (2, 2)), [[0, 1, 2, 0, 1, 2], [0, 1, 2, 0, 1, 2]])
760 assert_equal(tile(a, (1, 2)), [[0, 1, 2, 0, 1, 2]])
761 assert_equal(tile(b, 2), [[1, 2, 1, 2], [3, 4, 3, 4]])
762 assert_equal(tile(b, (2, 1)), [[1, 2], [3, 4], [1, 2], [3, 4]])
763 assert_equal(tile(b, (2, 2)), [[1, 2, 1, 2], [3, 4, 3, 4],
764 [1, 2, 1, 2], [3, 4, 3, 4]])
765
766 def test_tile_one_repetition_on_array_gh4679(self):
767 a = np.arange(5)

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
tileFunction · 0.90

Tested by

no test coverage detected