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

Function garrow_input_stream_read_tensor

c_glib/arrow-glib/input-stream.cpp:283–294  ·  view source on GitHub ↗

* garrow_input_stream_read_tensor: * @input_stream: A #GArrowInputStream. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (transfer full) (nullable): * #GArrowTensor on success, %NULL on error. * * Since: 0.11.0 */

Source from the content-addressed store, hash-verified

281 * Since: 0.11.0
282 */
283GArrowTensor *
284garrow_input_stream_read_tensor(GArrowInputStream *input_stream, GError **error)
285{
286 auto arrow_input_stream = garrow_input_stream_get_raw(input_stream);
287
288 auto arrow_tensor = arrow::ipc::ReadTensor(arrow_input_stream.get());
289 if (garrow::check(error, arrow_tensor, "[input-stream][read-tensor]")) {
290 return garrow_tensor_new_raw(&(arrow_tensor.ValueOrDie()));
291 } else {
292 return NULL;
293 }
294}
295
296/**
297 * garrow_input_stream_read_record_batch:

Callers

nothing calls this directly

Calls 5

ReadTensorFunction · 0.85
ValueOrDieMethod · 0.80
checkFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected