(self)
| 81 | assert_equal(sumall, np.sum(M)) |
| 82 | |
| 83 | def test_prod(self): |
| 84 | x = matrix([[1, 2, 3], [4, 5, 6]]) |
| 85 | assert_equal(x.prod(), 720) |
| 86 | assert_equal(x.prod(0), matrix([[4, 10, 18]])) |
| 87 | assert_equal(x.prod(1), matrix([[6], [120]])) |
| 88 | |
| 89 | assert_equal(np.prod(x), 720) |
| 90 | assert_equal(np.prod(x, axis=0), matrix([[4, 10, 18]])) |
| 91 | assert_equal(np.prod(x, axis=1), matrix([[6], [120]])) |
| 92 | |
| 93 | y = matrix([0, 1, 3]) |
| 94 | assert_(y.prod() == 0) |
| 95 | |
| 96 | def test_max(self): |
| 97 | x = matrix([[1, 2, 3], [4, 5, 6]]) |
nothing calls this directly
no test coverage detected