MCPcopy
hub / github.com/numpy/numpy / test_kroncompare

Method test_kroncompare

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

Source from the content-addressed store, hash-verified

778 assert_equal(d, (3, 2, 0))
779
780 def test_kroncompare(self):
781 from numpy.random import randint
782
783 reps = [(2,), (1, 2), (2, 1), (2, 2), (2, 3, 2), (3, 2)]
784 shape = [(3,), (2, 3), (3, 4, 3), (3, 2, 3), (4, 3, 2, 4), (2, 2)]
785 for s in shape:
786 b = randint(0, 10, size=s)
787 for r in reps:
788 a = np.ones(r, b.dtype)
789 large = tile(b, r)
790 klarge = kron(a, b)
791 assert_equal(large, klarge)
792
793
794class TestMayShareMemory:

Callers

nothing calls this directly

Calls 3

tileFunction · 0.90
kronFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected