MCPcopy Create free account
hub / github.com/catboost/catboost / ProcessArrowArrayStream

Function ProcessArrowArrayStream

catboost/python-package/catboost/arrow.cpp:362–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360
361 template <class F>
362 void ProcessArrowArrayStream(
363 PyObject* capsule,
364 F&& callback
365 ) {
366 try {
367 auto* stream = (ArrowArrayStream*)PyCapsule_GetPointer(capsule, "arrow_array_stream");
368 if (!stream) {
369 return;
370 }
371
372 auto array = MakeIntrusive<TArrowArrayHolder>(stream);
373 auto schema = MakeIntrusive<TArrowSchemaHolder>(stream);
374
375 callback(std::move(schema), std::move(array));
376
377 } catch (...) {
378 ProcessException();
379 }
380 }
381
382 void AsyncAddArrowNumColumn(
383 ui32 flatFeatureIdx,

Calls 3

ProcessExceptionFunction · 0.70
callbackFunction · 0.50
moveFunction · 0.50

Tested by

no test coverage detected