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

Function GetPrimitiveValues

python/pyarrow/src/arrow/python/arrow_to_pandas.cc:302–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300
301template <typename T = void>
302inline const T* GetPrimitiveValues(const Array& arr) {
303 if (arr.length() == 0) {
304 return nullptr;
305 }
306 const int elsize = arr.type()->byte_width();
307 const auto& prim_arr = checked_cast<const PrimitiveArray&>(arr);
308 return reinterpret_cast<const T*>(prim_arr.values()->data() + arr.offset() * elsize);
309}
310
311Status MakeNumPyView(std::shared_ptr<Array> arr, PyObject* py_ref, int npy_type, int ndim,
312 npy_intp* dims, PyObject** out) {

Callers 1

MakeNumPyViewFunction · 0.85

Calls 6

lengthMethod · 0.45
byte_widthMethod · 0.45
typeMethod · 0.45
dataMethod · 0.45
valuesMethod · 0.45
offsetMethod · 0.45

Tested by

no test coverage detected