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

Function PyArray_Dump

numpy/core/src/multiarray/methods.c:2310–2330  ·  view source on GitHub ↗

NUMPY_API*/

Source from the content-addressed store, hash-verified

2308
2309/*NUMPY_API*/
2310NPY_NO_EXPORT int
2311PyArray_Dump(PyObject *self, PyObject *file, int protocol)
2312{
2313 static PyObject *method = NULL;
2314 PyObject *ret;
2315 npy_cache_import("numpy.core._methods", "_dump", &method);
2316 if (method == NULL) {
2317 return -1;
2318 }
2319 if (protocol < 0) {
2320 ret = PyObject_CallFunction(method, "OO", self, file);
2321 }
2322 else {
2323 ret = PyObject_CallFunction(method, "OOi", self, file, protocol);
2324 }
2325 if (ret == NULL) {
2326 return -1;
2327 }
2328 Py_DECREF(ret);
2329 return 0;
2330}
2331
2332/*NUMPY_API*/
2333NPY_NO_EXPORT PyObject *

Callers

nothing calls this directly

Calls 1

npy_cache_importFunction · 0.85

Tested by

no test coverage detected