(self)
| 2666 | assert_array_equal(x, [2, 3]) |
| 2667 | |
| 2668 | def test_0d(self): |
| 2669 | x = np.array(3) |
| 2670 | y = piecewise(x, x > 3, [4, 0]) |
| 2671 | assert_(y.ndim == 0) |
| 2672 | assert_(y == 0) |
| 2673 | |
| 2674 | x = 5 |
| 2675 | y = piecewise(x, [True, False], [1, 0]) |
| 2676 | assert_(y.ndim == 0) |
| 2677 | assert_(y == 1) |
| 2678 | |
| 2679 | # With 3 ranges (It was failing, before) |
| 2680 | y = piecewise(x, [False, False, True], [1, 2, 3]) |
| 2681 | assert_array_equal(y, 3) |
| 2682 | |
| 2683 | def test_0d_comparison(self): |
| 2684 | x = 3 |
nothing calls this directly
no test coverage detected