()
| 237 | |
| 238 | |
| 239 | def dlpack_objects(): |
| 240 | arr = pa.array([1, 2, 3], type=pa.int32()) |
| 241 | return [ |
| 242 | pytest.param(arr, id="array"), |
| 243 | pytest.param(arr.slice(1), id="sliced_array"), |
| 244 | pytest.param(pa.array([], type=pa.int32()), id="empty_array"), |
| 245 | pytest.param( |
| 246 | pa.Tensor.from_numpy(np.array([[1, 2], [3, 4]], dtype=np.int32)), |
| 247 | id="tensor", |
| 248 | ), |
| 249 | ] |
| 250 | |
| 251 | |
| 252 | @check_bytes_allocated |