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–296  ·  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 ARROW_SUPPRESS_DEPRECATION_WARNING
289 auto arrow_tensor = arrow::ipc::ReadTensor(arrow_input_stream.get());
290 ARROW_UNSUPPRESS_DEPRECATION_WARNING
291 if (garrow::check(error, arrow_tensor, "[input-stream][read-tensor]")) {
292 return garrow_tensor_new_raw(&(arrow_tensor.ValueOrDie()));
293 } else {
294 return NULL;
295 }
296}
297
298/**
299 * 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