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

Function PyArray_CastingConverter

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

NUMPY_API * Convert any Python object, *obj*, to an NPY_CASTING enum. */

Source from the content-addressed store, hash-verified

939 * Convert any Python object, *obj*, to an NPY_CASTING enum.
940 */
941NPY_NO_EXPORT int
942PyArray_CastingConverter(PyObject *obj, NPY_CASTING *casting)
943{
944 return string_converter_helper(
945 obj, (void *)casting, casting_parser, "casting",
946 "must be one of 'no', 'equiv', 'safe', "
947 "'same_kind', or 'unsafe'");
948 return 0;
949}
950
951/*****************************
952* Other conversion functions

Callers 3

array_concatenateFunction · 0.85
array_einsumFunction · 0.85
convert_ufunc_argumentsFunction · 0.85

Calls 1

string_converter_helperFunction · 0.85

Tested by

no test coverage detected