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

Function _not_NoValue

numpy/core/src/umath/ufunc_object.c:3942–3957  ·  view source on GitHub ↗

* Convert function which replaces np._NoValue with NULL. * As a converter returns 0 on error and 1 on success. */

Source from the content-addressed store, hash-verified

3940 * As a converter returns 0 on error and 1 on success.
3941 */
3942static int
3943_not_NoValue(PyObject *obj, PyObject **out)
3944{
3945 static PyObject *NoValue = NULL;
3946 npy_cache_import("numpy", "_NoValue", &NoValue);
3947 if (NoValue == NULL) {
3948 return 0;
3949 }
3950 if (obj == NoValue) {
3951 *out = NULL;
3952 }
3953 else {
3954 *out = obj;
3955 }
3956 return 1;
3957}
3958
3959
3960/* forward declaration */

Callers

nothing calls this directly

Calls 1

npy_cache_importFunction · 0.85

Tested by

no test coverage detected