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

Function NumPyScalarToArrowDataType

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

NumPyDtypeToArrowFunction · 0.85

Tested by

no test coverage detected