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

Function test_average_matrix

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

Source from the content-addressed store, hash-verified

235
236
237def test_average_matrix():
238 # 2018-04-29: moved here from core.tests.test_function_base.
239 y = np.matrix(np.random.rand(5, 5))
240 assert_array_equal(y.mean(0), np.average(y, 0))
241
242 a = np.matrix([[1, 2], [3, 4]])
243 w = np.matrix([[1, 2], [3, 4]])
244
245 r = np.average(a, axis=0, weights=w)
246 assert_equal(type(r), np.matrix)
247 assert_equal(r, [[2.5, 10.0 / 3]])
248
249
250def test_dot_matrix():

Callers

nothing calls this directly

Calls 3

assert_array_equalFunction · 0.90
assert_equalFunction · 0.90
meanMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…