(self)
| 476 | assert_(maximum.reduce(x) == 4) |
| 477 | |
| 478 | def test_testTakeTransposeInnerOuter(self): |
| 479 | # Test of take, transpose, inner, outer products |
| 480 | x = arange(24) |
| 481 | y = np.arange(24) |
| 482 | x[5:6] = masked |
| 483 | x = x.reshape(2, 3, 4) |
| 484 | y = y.reshape(2, 3, 4) |
| 485 | assert_(eq(np.transpose(y, (2, 0, 1)), transpose(x, (2, 0, 1)))) |
| 486 | assert_(eq(np.take(y, (2, 0, 1), 1), take(x, (2, 0, 1), 1))) |
| 487 | assert_(eq(np.inner(filled(x, 0), filled(y, 0)), |
| 488 | inner(x, y))) |
| 489 | assert_(eq(np.outer(filled(x, 0), filled(y, 0)), |
| 490 | outer(x, y))) |
| 491 | y = array(['abc', 1, 'def', 2, 3], object) |
| 492 | y[2] = masked |
| 493 | t = take(y, [0, 3, 4]) |
| 494 | assert_(t[0] == 'abc') |
| 495 | assert_(t[1] == 2) |
| 496 | assert_(t[2] == 3) |
| 497 | |
| 498 | def test_testInplace(self): |
| 499 | # Test of inplace operations and rich comparisons |
nothing calls this directly
no test coverage detected