(self)
| 22 | class TestAppend(TestCase): |
| 23 | # tests taken from np.append docstring |
| 24 | def test_basic(self): |
| 25 | result = np.append([1, 2, 3], [[4, 5, 6], [7, 8, 9]]) |
| 26 | assert_equal(result, np.arange(1, 10, dtype=int)) |
| 27 | |
| 28 | # When `axis` is specified, `values` must have the correct shape. |
| 29 | result = np.append([[1, 2, 3], [4, 5, 6]], [[7, 8, 9]], axis=0) |
| 30 | assert_equal(result, np.arange(1, 10, dtype=int).reshape((3, 3))) |
| 31 | |
| 32 | with pytest.raises((RuntimeError, ValueError)): |
| 33 | np.append([[1, 2, 3], [4, 5, 6]], [7, 8, 9], axis=0) |
| 34 | |
| 35 | |
| 36 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected