()
| 4319 | |
| 4320 | @pytest.mark.numpy |
| 4321 | def test_run_end_encoded_to_numpy(): |
| 4322 | arr = [1, 2, 2, 3, 3, 3] |
| 4323 | ree_array = pa.array(arr, pa.run_end_encoded(pa.int32(), pa.int64())) |
| 4324 | expected = np.array(arr) |
| 4325 | |
| 4326 | np.testing.assert_array_equal(ree_array.to_numpy(zero_copy_only=False), expected) |
| 4327 | |
| 4328 | with pytest.raises(pa.ArrowInvalid): |
| 4329 | ree_array.to_numpy() |
| 4330 | |
| 4331 | |
| 4332 | @pytest.mark.pandas |