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

Function GetSafeNumPyDtype

python/pyarrow/src/arrow/python/numpy_internal.h:182–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182static inline PyArray_Descr* GetSafeNumPyDtype(int type) {
183 if (type == NPY_DATETIME || type == NPY_TIMEDELTA) {
184 // It is not safe to mutate the result of DescrFromType for datetime and
185 // timedelta descriptors
186 return PyArray_DescrNewFromType(type);
187 } else {
188 return PyArray_DescrFromType(type);
189 }
190}
191
192} // namespace internal
193

Callers 2

MakeNumPyViewFunction · 0.85
AllocateNDArrayMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected