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

Method test_kron_ma

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

Source from the content-addressed store, hash-verified

695 assert_array_equal(np.kron(a, b), k)
696
697 def test_kron_ma(self):
698 x = np.ma.array([[1, 2], [3, 4]], mask=[[0, 1], [1, 0]])
699 k = np.ma.array(np.diag([1, 4, 4, 16]),
700 mask=~np.array(np.identity(4), dtype=bool))
701
702 assert_array_equal(k, np.kron(x, x))
703
704 @pytest.mark.parametrize(
705 "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