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

Function test_chunked_array_to_numpy

python/pyarrow/tests/test_table.py:132–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130
131@pytest.mark.numpy
132def test_chunked_array_to_numpy():
133 data = pa.chunked_array([
134 [1, 2, 3],
135 [4, 5, 6],
136 []
137 ])
138 arr1 = np.asarray(data)
139 arr2 = data.to_numpy()
140
141 assert isinstance(arr2, np.ndarray)
142 assert arr2.shape == (6,)
143 assert np.array_equal(arr1, arr2)
144
145
146def test_chunked_array_mismatch_types():

Callers

nothing calls this directly

Calls 1

chunked_arrayMethod · 0.80

Tested by

no test coverage detected