MCPcopy Create free account
hub / github.com/numpy/numpy / test_kroncompare

Method test_kroncompare

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

Source from the content-addressed store, hash-verified

749 assert_equal(d, (3, 2, 0))
750
751 def test_kroncompare(self):
752 from numpy.random import randint
753
754 reps = [(2,), (1, 2), (2, 1), (2, 2), (2, 3, 2), (3, 2)]
755 shape = [(3,), (2, 3), (3, 4, 3), (3, 2, 3), (4, 3, 2, 4), (2, 2)]
756 for s in shape:
757 b = randint(0, 10, size=s)
758 for r in reps:
759 a = np.ones(r, b.dtype)
760 large = tile(b, r)
761 klarge = kron(a, b)
762 assert_equal(large, klarge)
763
764
765class TestMayShareMemory:

Callers

nothing calls this directly

Calls 3

tileFunction · 0.90
kronFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected