(self)
| 538 | assert_(maximum.reduce(x) == 4) |
| 539 | |
| 540 | def test_testTakeTransposeInnerOuter(self): |
| 541 | # Test of take, transpose, inner, outer products |
| 542 | x = arange(24) |
| 543 | y = np.arange(24) |
| 544 | x[5:6] = masked |
| 545 | x = x.reshape(2, 3, 4) |
| 546 | y = y.reshape(2, 3, 4) |
| 547 | assert_(eq(np.transpose(y, (2, 0, 1)), transpose(x, (2, 0, 1)))) |
| 548 | assert_(eq(np.take(y, (2, 0, 1), 1), take(x, (2, 0, 1), 1))) |
| 549 | assert_(eq(np.inner(filled(x, 0), filled(y, 0)), |
| 550 | inner(x, y))) |
| 551 | assert_(eq(np.outer(filled(x, 0), filled(y, 0)), |
| 552 | outer(x, y))) |
| 553 | y = array(['abc', 1, 'def', 2, 3], object) |
| 554 | y[2] = masked |
| 555 | t = take(y, [0, 3, 4]) |
| 556 | assert_(t[0] == 'abc') |
| 557 | assert_(t[1] == 2) |
| 558 | assert_(t[2] == 3) |
| 559 | |
| 560 | def test_testInplace(self): |
| 561 | # Test of inplace operations and rich comparisons |
nothing calls this directly
no test coverage detected