()
| 198 | |
| 199 | @pytest.mark.numpy |
| 200 | def test_chunked_array_to_numpy_zero_copy(): |
| 201 | elements = [[2, 2, 4], [4, 5, 100]] |
| 202 | |
| 203 | chunked_arr = pa.chunked_array(elements) |
| 204 | |
| 205 | msg = "zero_copy_only must be False for pyarrow.ChunkedArray.to_numpy" |
| 206 | |
| 207 | with pytest.raises(ValueError, match=msg): |
| 208 | chunked_arr.to_numpy(zero_copy_only=True) |
| 209 | |
| 210 | np_arr = chunked_arr.to_numpy() |
| 211 | expected = [2, 2, 4, 4, 5, 100] |
| 212 | np.testing.assert_array_equal(np_arr, expected) |
| 213 | |
| 214 | |
| 215 | @pytest.mark.numpy |
nothing calls this directly
no test coverage detected