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

Method test_kron_ma

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

Source from the content-addressed store, hash-verified

724 assert_array_equal(np.kron(a, b), k)
725
726 def test_kron_ma(self):
727 x = np.ma.array([[1, 2], [3, 4]], mask=[[0, 1], [1, 0]])
728 k = np.ma.array(np.diag([1, 4, 4, 16]),
729 mask=~np.array(np.identity(4), dtype=bool))
730
731 assert_array_equal(k, np.kron(x, x))
732
733 @pytest.mark.parametrize(
734 "shape_a,shape_b", [

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
identityMethod · 0.80

Tested by

no test coverage detected