(self, dt)
| 8518 | |
| 8519 | # Simple, 1d tests |
| 8520 | def test_simple(self, dt): |
| 8521 | # Test padding with constant values |
| 8522 | x = np.linspace(1, 5, 5).astype(dt) |
| 8523 | r = [[0, 1, 2], [1, 2, 3], [2, 3, 4], [3, 4, 5], [4, 5, 0]] |
| 8524 | l = _multiarray_tests.test_neighborhood_iterator( |
| 8525 | x, [-1, 1], x[0], NEIGH_MODE['zero']) |
| 8526 | assert_array_equal(l, r) |
| 8527 | |
| 8528 | r = [[1, 1, 2], [1, 2, 3], [2, 3, 4], [3, 4, 5], [4, 5, 1]] |
| 8529 | l = _multiarray_tests.test_neighborhood_iterator( |
| 8530 | x, [-1, 1], x[0], NEIGH_MODE['one']) |
| 8531 | assert_array_equal(l, r) |
| 8532 | |
| 8533 | r = [[x[4], 1, 2], [1, 2, 3], [2, 3, 4], [3, 4, 5], [4, 5, x[4]]] |
| 8534 | l = _multiarray_tests.test_neighborhood_iterator( |
| 8535 | x, [-1, 1], x[4], NEIGH_MODE['constant']) |
| 8536 | assert_array_equal(l, r) |
| 8537 | |
| 8538 | # Test mirror modes |
| 8539 | def test_mirror(self, dt): |
nothing calls this directly
no test coverage detected