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

Function NumPyScalarToArrowDataType

python/pyarrow/src/arrow/python/numpy_convert.cc:119–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117} // namespace
118
119Result<std::shared_ptr<DataType>> NumPyScalarToArrowDataType(PyObject* scalar) {
120 PyArray_Descr* descr = PyArray_DescrFromScalar(scalar);
121 OwnedRef descr_ref(reinterpret_cast<PyObject*>(descr));
122 return NumPyDtypeToArrow(descr);
123}
124
125Result<std::shared_ptr<DataType>> NumPyDtypeToArrow(PyObject* dtype) {
126 if (!PyObject_TypeCheck(dtype, &PyArrayDescr_Type)) {

Callers

nothing calls this directly

Calls 1

NumPyDtypeToArrowFunction · 0.85

Tested by

no test coverage detected