MCPcopy Create free account
hub / github.com/apache/arrow / multidim_arrays

Function multidim_arrays

python/pyarrow/tests/test_dlpack.py:145–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

143
144
145def 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")

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.45

Tested by

no test coverage detected