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

Function GetPrimitiveValues

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

Source from the content-addressed store, hash-verified

311
312template <typename T = void>
313inline const T* GetPrimitiveValues(const Array& arr) {
314 if (arr.length() == 0) {
315 return nullptr;
316 }
317 const int elsize = arr.type()->byte_width();
318 const auto& prim_arr = checked_cast<const PrimitiveArray&>(arr);
319 return reinterpret_cast<const T*>(prim_arr.values()->data() + arr.offset() * elsize);
320}
321
322Status MakeNumPyView(std::shared_ptr<Array> arr, PyObject* py_ref, int npy_type, int ndim,
323 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