| 525 | assert_(eq(z, [99, 1, 1, 99, 99, 99])) |
| 526 | |
| 527 | def test_testMinMax2(self): |
| 528 | # Test of minimum, maximum. |
| 529 | assert_(eq(minimum([1, 2, 3], [4, 0, 9]), [1, 0, 3])) |
| 530 | assert_(eq(maximum([1, 2, 3], [4, 0, 9]), [4, 2, 9])) |
| 531 | x = arange(5) |
| 532 | y = arange(5) - 2 |
| 533 | x[3] = masked |
| 534 | y[0] = masked |
| 535 | assert_(eq(minimum(x, y), where(less(x, y), x, y))) |
| 536 | assert_(eq(maximum(x, y), where(greater(x, y), x, y))) |
| 537 | assert_(minimum.reduce(x) == 0) |
| 538 | assert_(maximum.reduce(x) == 4) |
| 539 | |
| 540 | def test_testTakeTransposeInnerOuter(self): |
| 541 | # Test of take, transpose, inner, outer products |