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

Function NumPyFrequency

python/pyarrow/src/arrow/python/type_traits.h:302–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300};
301
302static inline NPY_DATETIMEUNIT NumPyFrequency(TimeUnit::type unit) {
303 switch (unit) {
304 case TimestampType::Unit::SECOND:
305 return NPY_FR_s;
306 case TimestampType::Unit::MILLI:
307 return NPY_FR_ms;
308 break;
309 case TimestampType::Unit::MICRO:
310 return NPY_FR_us;
311 default:
312 // NANO
313 return NPY_FR_ns;
314 }
315}
316
317static inline int NumPyTypeSize(int npy_type) {
318 npy_type = fix_numpy_type_num(npy_type);

Callers 3

set_numpy_metadataFunction · 0.85
AllocateMethod · 0.85
AllocateTimedeltaMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected