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

Function PyArray_SortkindConverter

numpy/core/src/multiarray/conversion_utils.c:581–591  ·  view source on GitHub ↗

NUMPY_API * Convert object to sort kind */

Source from the content-addressed store, hash-verified

579 * Convert object to sort kind
580 */
581NPY_NO_EXPORT int
582PyArray_SortkindConverter(PyObject *obj, NPY_SORTKIND *sortkind)
583{
584 /* Leave the desired default from the caller for Py_None */
585 if (obj == Py_None) {
586 return NPY_SUCCEED;
587 }
588 return string_converter_helper(
589 obj, (void *)sortkind, sortkind_parser, "sort kind",
590 "must be one of 'quick', 'heap', or 'stable'");
591}
592
593static int selectkind_parser(char const *str, Py_ssize_t length, void *data)
594{

Callers

nothing calls this directly

Calls 1

string_converter_helperFunction · 0.85

Tested by

no test coverage detected