()
| 143 | |
| 144 | |
| 145 | def multidim_arrays(): |
| 146 | np_arr = np.arange(12, dtype=np.int32).reshape(3, 2, 2) |
| 147 | values = pa.array(np_arr.ravel(), type=pa.int32()) |
| 148 | nested_list = pa.FixedSizeListArray.from_arrays( |
| 149 | pa.FixedSizeListArray.from_arrays(values, 2), 2) |
| 150 | return [ |
| 151 | pytest.param(nested_list, np_arr, id="nested_fixed_size_list"), |
| 152 | pytest.param( |
| 153 | pa.FixedShapeTensorArray.from_numpy_ndarray(np_arr), |
| 154 | np_arr, |
| 155 | id="fixed_shape_tensor", |
| 156 | ), |
| 157 | ] |
| 158 | |
| 159 | |
| 160 | @requires_numpy_version("2.1.0") |