(self)
| 2929 | assert_array_equal(x, [2, 3]) |
| 2930 | |
| 2931 | def test_0d(self): |
| 2932 | x = np.array(3) |
| 2933 | y = piecewise(x, x > 3, [4, 0]) |
| 2934 | assert_(y.ndim == 0) |
| 2935 | assert_(y == 0) |
| 2936 | |
| 2937 | x = 5 |
| 2938 | y = piecewise(x, [True, False], [1, 0]) |
| 2939 | assert_(y.ndim == 0) |
| 2940 | assert_(y == 1) |
| 2941 | |
| 2942 | # With 3 ranges (It was failing, before) |
| 2943 | y = piecewise(x, [False, False, True], [1, 2, 3]) |
| 2944 | assert_array_equal(y, 3) |
| 2945 | |
| 2946 | def test_0d_comparison(self): |
| 2947 | x = 3 |
nothing calls this directly
no test coverage detected