MCPcopy Create free account
hub / github.com/numpy/numpy / _get_partition_func

Function _get_partition_func

numpy/core/src/npysort/selection.cpp:445–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443constexpr std::array<arg_map, partition_t::taglist::size> partition_t::map;
444
445static inline PyArray_PartitionFunc *
446_get_partition_func(int type, NPY_SELECTKIND which)
447{
448 npy_intp i;
449 npy_intp ntypes = partition_t::map.size();
450
451 if (which >= NPY_NSELECTS) {
452 return NULL;
453 }
454 for (i = 0; i < ntypes; i++) {
455 if (type == partition_t::map[i].typenum) {
456 return partition_t::map[i].part[which];
457 }
458 }
459 return NULL;
460}
461
462static inline PyArray_ArgPartitionFunc *
463_get_argpartition_func(int type, NPY_SELECTKIND which)

Callers 1

selection.cppFile · 0.85

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected