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

Function test_inner_scalar_and_matrix

numpy/matrixlib/tests/test_interaction.py:75–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73
74
75def test_inner_scalar_and_matrix():
76 # 2018-04-29: moved here from core.tests.test_multiarray
77 for dt in np.typecodes['AllInteger'] + np.typecodes['AllFloat'] + '?':
78 sca = np.array(3, dtype=dt)[()]
79 arr = np.matrix([[1, 2], [3, 4]], dtype=dt)
80 desired = np.matrix([[3, 6], [9, 12]], dtype=dt)
81 assert_equal(np.inner(arr, sca), desired)
82 assert_equal(np.inner(sca, arr), desired)
83
84
85def test_inner_scalar_and_matrix_of_objects():

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
innerMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…