()
| 278 | |
| 279 | @pytest.mark.numpy |
| 280 | def test_to_numpy_dictionary(): |
| 281 | # ARROW-7591 |
| 282 | arr = pa.array(["a", "b", "a"]).dictionary_encode() |
| 283 | expected = np.array(["a", "b", "a"], dtype=object) |
| 284 | np_arr = arr.to_numpy(zero_copy_only=False) |
| 285 | np.testing.assert_array_equal(np_arr, expected) |
| 286 | |
| 287 | |
| 288 | @pytest.mark.pandas |