(self)
| 1368 | class TestVectorize: |
| 1369 | |
| 1370 | def test_simple(self): |
| 1371 | def addsubtract(a, b): |
| 1372 | if a > b: |
| 1373 | return a - b |
| 1374 | else: |
| 1375 | return a + b |
| 1376 | |
| 1377 | f = vectorize(addsubtract) |
| 1378 | r = f([0, 3, 6, 9], [1, 3, 5, 7]) |
| 1379 | assert_array_equal(r, [1, 6, 1, 2]) |
| 1380 | |
| 1381 | def test_scalar(self): |
| 1382 | def addsubtract(a, b): |
nothing calls this directly
no test coverage detected