| 463 | assert_(eq(z, [99, 1, 1, 99, 99, 99])) |
| 464 | |
| 465 | def test_testMinMax2(self): |
| 466 | # Test of minimum, maximum. |
| 467 | assert_(eq(minimum([1, 2, 3], [4, 0, 9]), [1, 0, 3])) |
| 468 | assert_(eq(maximum([1, 2, 3], [4, 0, 9]), [4, 2, 9])) |
| 469 | x = arange(5) |
| 470 | y = arange(5) - 2 |
| 471 | x[3] = masked |
| 472 | y[0] = masked |
| 473 | assert_(eq(minimum(x, y), where(less(x, y), x, y))) |
| 474 | assert_(eq(maximum(x, y), where(greater(x, y), x, y))) |
| 475 | assert_(minimum.reduce(x) == 0) |
| 476 | assert_(maximum.reduce(x) == 4) |
| 477 | |
| 478 | def test_testTakeTransposeInnerOuter(self): |
| 479 | # Test of take, transpose, inner, outer products |