()
| 235 | |
| 236 | |
| 237 | def 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 | |
| 250 | def test_dot_matrix(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…