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

Function test_recordbatch_to_tensor_unsupported

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

Source from the content-addressed store, hash-verified

1255
1256
1257def test_recordbatch_to_tensor_unsupported():
1258 arr1 = [1, 2, 3, 4, 5, 6, 7, 8, 9]
1259 # Unsupported data type
1260 arr2 = ["a", "b", "c", "a", "b", "c", "a", "b", "c"]
1261 batch = pa.RecordBatch.from_arrays(
1262 [
1263 pa.array(arr1, type=pa.int32()),
1264 pa.array(arr2, type=pa.utf8()),
1265 ], ["a", "b"]
1266 )
1267 with pytest.raises(
1268 pa.ArrowTypeError,
1269 match="DataType is not supported"
1270 ):
1271 batch.to_tensor()
1272
1273
1274@pytest.mark.numpy

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.45

Tested by

no test coverage detected