| 281 | |
| 282 | @pytest.mark.numpy |
| 283 | def test_call_function_with_memory_pool(): |
| 284 | arr = pa.array(["foo", "bar", "baz"]) |
| 285 | indices = np.array([2, 2, 1]) |
| 286 | result1 = arr.take(indices) |
| 287 | result2 = pc.call_function('take', [arr, indices], |
| 288 | memory_pool=pa.default_memory_pool()) |
| 289 | expected = pa.array(["baz", "baz", "bar"]) |
| 290 | assert result1.equals(expected) |
| 291 | assert result2.equals(expected) |
| 292 | |
| 293 | result3 = pc.take(arr, indices, memory_pool=pa.default_memory_pool()) |
| 294 | assert result3.equals(expected) |
| 295 | |
| 296 | |
| 297 | def test_pickle_functions(pickle_module): |