()
| 34 | |
| 35 | |
| 36 | def test_buffer_device(): |
| 37 | arr = pa.array([0, 1, 2]) |
| 38 | buf = arr.buffers()[1] |
| 39 | assert buf.device_type == pa.DeviceAllocationType.CPU |
| 40 | assert isinstance(buf.device, pa.Device) |
| 41 | assert isinstance(buf.memory_manager, pa.MemoryManager) |
| 42 | assert buf.is_cpu |
| 43 | assert buf.device.is_cpu |
| 44 | assert buf.device == pa.default_cpu_memory_manager().device |
| 45 | assert buf.memory_manager.is_cpu |
| 46 | |
| 47 | |
| 48 | def test_copy_to(): |